I'm getting an error thrown at this location, but the INSERT is successful prior to the error works. I've done a lot of searching for the answer, but I can not find what I'm looking for. There is NO innerexception information. The error is
public void AddImpactCategory(OperationalImpactCategory category)
{
using (IDataContext ctx = DataContext.Instance())
{
ctx.GetRepository<OperationalImpactCategory>().Insert(category);
}
}
[TableName("BB_OpImpactCategory")]
[PrimaryKey("OpImpactCatID", AutoIncrement = true)]
[Cacheable("ImpactCategory", CacheItemPriority.Default, 20)]
[Scope("ModuleId")]
[JsonObject(MemberSerialization.OptIn)]
public class OperationalImpactCategory
{
[ColumnName("OpImpactCatID")]
[JsonProperty]
public int ID { get; set; }
[JsonProperty]
public string Title { get; set; }
[JsonProperty]
public bool IsActive { get; set; }
[JsonProperty]
public DateTime CreatedOn { get; set; }
[JsonProperty]
public string CreatedBy { get; set; }
[JsonProperty]
public DateTime ModifiedOn { get; set; }
[JsonProperty]
public string ModifiedBy { get; set; }
}
[AllowAnonymous]
[HttpPost()]
public string AddImpactCategory([FromBody]string cat)
{
try
{
//UserInfo uInfo = ucon.GetCurrentUserInfo();
OperationalImpactCategory ob = JsonConvert.DeserializeObject<OperationalImpactCategory>(cat, jsonSet);
con.AddImpactCategory(ob);
return "Success!";
}
catch(Exception ex)
{
return ex.Message;
}
}
Stack Trace:
at DotNetNuke.Data.RepositoryBase`1.GetPropertyValue[TProperty](T item, String
propertyName) at DotNetNuke.Data.RepositoryBase`1.ClearCache(T item) at
Modules.BudgetWorksheet.Components.DataController.AddImpactCategory(OperationalImpactCategory
category) in
C:\DNNDEV\DesktopModules\BudgetWorksheet\Components\DataController.cs:line 121
Any assistance is appreciated.