public async Task <int> Insert(LearningPath model) { var parameters = new { model.Name, model.Slug, model.TotalCourses, model.PathIcon, model.LearningPathDescription, @CreateDate = DateTime.Now, @ModifiedDate = DateTime.Now }; var result = await _dapperBaseRepository.Excute("sp_AddLearningPath", parameters); Elastic.LogInformation(model, EnumHelper.GetEnumValue(EnumHelper.SystemEnums.Status, result), MethodBase.GetCurrentMethod().DeclaringType.FullName, "UserIDHERE"); return(result); }
public async Task <int> Update(LearningPath model) { var parameters = new { model.Id, model.Name, model.Slug, model.PathIcon, model.LearningPathDescription, @ModifiedDate = DateTime.Now }; //execute find method to get current details (async dont await) var currentObject = Find(model.Id); var result = await _dapperBaseRepository.Excute("sp_UpdateLearningPath", parameters); Elastic.LogInformation(await currentObject, model, EnumHelper.GetEnumValue(EnumHelper.SystemEnums.Status, result), MethodBase.GetCurrentMethod().DeclaringType.FullName, "userIDHERE"); return(result); }