Пример #1
0
 public async Task <UserLogin> AddUserAsync(UserLogin info)
 {
     _context.Add(info);
     try
     {
         await _context.SaveChangesAsync();
     }
     catch (System.Exception exp)
     {
         _Logger.LogError($"Error in {nameof(AddUserAsync)}: " + exp.Message);
     }
     return(info);
 }
Пример #2
0
 public async Task <Messages> AddMsgAsync(Messages data)
 {
     _context.Add(data);
     try
     {
         await _context.SaveChangesAsync();
     }
     catch (System.Exception exp)
     {
         _Logger.LogError($"Error in {nameof(AddMsgAsync)}: " + exp.Message);
     }
     return(data);
 }