//הוספת מפעל חדש public static void setFactory(factoryDto newFactory) { using (ProjectZUEntities db = new ProjectZUEntities()) { db.Factories.Add(convertion.FactoryConvertion.ConvertToFactory(newFactory)); db.SaveChanges(); } }
//הוספת משתמש public static void AddNewcustomer(CustomerDto customerDto) { using (ProjectZUEntities db = new ProjectZUEntities()) { //הוספת חדש post db.Customers.Add(convertion.customerConvertion.ConvertToCustomer(customerDto)); db.SaveChanges(); } }
public static bool postFuniture(FurnitureFullDto furniturFul) { using (ProjectZUEntities db = new ProjectZUEntities()) { // ColorForFurniture color = new ColorForFurniture(); //שרשור נתונים db.Furnitures.Add(convertion.FurnitureFullconvertion.fullFuntiorConvertionToDto(furniturFul)); db.SaveChanges(); return(true); } }