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);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        public async Task <int> Login(string email, string password)
        {
            var parameters = new { @Email = email, @PasswordHash = password };

            return(await _dapperBase.Excute("sp_UserLogin", parameters));
        }
Exemplo n.º 4
0
        public async Task <int> AddAsync(Role model)
        {
            var parameters = new { model.RoleId, model.RoleName, model.CreatedDate };

            return(await _dapperBase.Excute("sp_AddUserRole", parameters));
        }