public async Task AddCompany(Entities.Companies company) { if (company == null) { throw new ArgumentNullException(nameof(company)); } await _context.AddAsync(company); }
public async Task UpdateCompany(Entities.Companies company) { if (company == null) { throw new ArgumentNullException(nameof(company)); } if (_context != null) { //Delete that post _context.Companies.Update(company); //Commit the transaction await this.SaveChanges(); } }