Beispiel #1
0
 public async void Registration([FromBody] UserViewModel userModel)
 {
     if (userModel != null)
     {
         Users user = new Users
         {
             SsouserId   = userModel.SsouserId,
             FirstName   = userModel.FirstName,
             LastName    = userModel.LastName,
             Email       = userModel.Email,
             PhoneNumber = userModel.PhoneNumber,
             CreatedBy   = userModel.SsouserId,
             CreatedOn   = userModel.CreatedOn,
             Status      = userModel.Status
         };
         context.Users.Add(user);
         await context.SaveChangesAsync();
     }
 }
 public async Task CommitAsync(CancellationToken token = default)
 {
     await _context.SaveChangesAsync(token);
 }