public ActionResult AddSupplier(SupplierValidation item) { Supplier obj = new Supplier(); obj.Name = item.Name; obj.Description = item.Description; obj.isActive = item.isActive; context.Suppliers.Add(obj); context.SaveChanges(); ModelState.Clear(); return(View()); }
public SuppliersController(ISupplierBusinessLogic supplierBusinessLogic, SupplierValidation supplierValidation) { this.supplierBusinessLogic = supplierBusinessLogic; this.supplierValidation = supplierValidation; }
public SupplierManager(ISupplierDal supplierDal) { validator = new SupplierValidation(); this.supplierDal = supplierDal; }