public int CreateUser(User user) { try { _smallLoansContext.Users.Add(user); _smallLoansContext.SaveChanges(); } catch (Exception ex) { _logger.LogError(ex.Message); } return(user.Id); }
public int CreateLoan(Loan loan) { try { _smallLoansContext.Loans.Add(loan); _smallLoansContext.SaveChanges(); } catch (Exception ex) { _logger.LogError(ex.Message); } return(loan.Id); }