public static void UpdateCompany(CompanyModel model, AppContext context) { Repository <Company> companyRepository = new Repository <Company>(context); Company company = new Company(); EntityParser parser = new EntityParser(); company = parser.Create(model, context); companyRepository.Update(company, model.Id); }
public static void UpdateInvoice(InvoiceModel model, AppContext context) { Repository <Invoice> invoiceRepository = new Repository <Invoice>(context); Invoice invoice = new Invoice(); EntityParser parser = new EntityParser(); invoice = parser.Create(model, context); invoiceRepository.Update(invoice, model.Id); }