public bool Signup(UserAdministration user) { user.Password = BCrypt.Net.BCrypt.HashPassword(user.Password); _dbContext.UserAdministrations.Add(user); _dbContext.SaveChanges(); return true; }
public string Insert(Invoice invoice) { _context.Invoices .Add(invoice); _context.SaveChanges(); return(invoice.InvoiceId); }
public string Insert(Company company) { bool isExists = true; string companyId = string.Empty; do { companyId = GenerateCompanyId().ToUpper(); isExists = _context.Companies.Any(c => c.CompanyId.Equals(companyId)); } while (isExists); company.CompanyId = companyId; _context.Companies .Add(company); _context.SaveChanges(); return(companyId); }
public int Complete() { return(_context.SaveChanges()); }
public void SaveChanges() { _context.SaveChanges(); }