예제 #1
0
        public async Task <KenUser> InsertAsync(KenUser user)
        {
            using (var context = _dbContextFactory.Create())
            {
                var result = await context.Users.AddAsync(user);

                await context.SaveChangesAsync();
            }
            return(user);
        }
예제 #2
0
 public async Task <KenUser> CreateUser(KenUser model)
 {
     try
     {
         return(await _userRepository.InsertAsync(model));
     }
     catch (Exception ex)
     {
         _log.Debug(ex);
         return(null);
     }
 }