public void Insert(PurchaseOrder order) { try { _context.PurchaseOrder.Add(order); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(Supplier supplier) { try { _context.Supplier.Add(supplier); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(PositionName positionName) { try { _context.PositionName.Add(positionName); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(Category category) { try { _context.Category.Add(category); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(Client client) { try { _context.Client.Add(client); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Delete(int id) { try { Address address = FindById(id); _context.Address.Remove(address); _context.SaveChanges(); }catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(Product product) { try { _context.Product.Add(product); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(List <CategoryProduct> categoryProduct) { try { _context.CategoryProduct.AddRange(categoryProduct); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Delete(int id) { try { State state = FindById(id); _context.State.Remove(state); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Delete(int id) { try { Contact contact = FindById(id); _context.Contact.Remove(contact); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public void Insert(Employee employee) { try { _context.Employee.Add(employee); _context.SaveChanges(); } catch (Exception e) { throw new Exception(e.Message); } }