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> Insert(Course model) { var parameters = new { model.ShortDescription, @Email = model.UserId, model.CourseName, model.LearningPathId, model.CreatedDate }; //UserId takes the email and the finds the userid from the users table in the database. return(await _dapperBase.Excute("sp_AddCourse", parameters)); }
public async Task <int> Login(string email, string password) { var parameters = new { @Email = email, @PasswordHash = password }; return(await _dapperBase.Excute("sp_UserLogin", parameters)); }
public async Task <int> AddAsync(Role model) { var parameters = new { model.RoleId, model.RoleName, model.CreatedDate }; return(await _dapperBase.Excute("sp_AddUserRole", parameters)); }