public Supplier getNorthSupplier(Libraries.Supplier supplier) { return(new Supplier { Address = supplier.address, ContactName = supplier.contactName, ContactTitle = supplier.contactTitle, Country = supplier.country, Fax = supplier.fax, SupplierID = supplier.id, CompanyName = supplier.name }); }
public bool modify(Libraries.Supplier supplier) { context.Suppliers.Remove(getNorthSupplier(getSupplier(supplier.id))); context.Suppliers.Add(getNorthSupplier(supplier)); return(true); }
public bool addSupplier(Libraries.Supplier supplier) { context.Suppliers.Add(getNorthSupplier(supplier)); return(true); }