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); }
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); }