public void CombineService() { Unit = new UnitOfWork(this); Insert(new CategoryDto { Name = "newCat", Description = "this is done by Combine method" }); IDataTypeService service = GetService <IDataTypeService>(); service.Insert(new DataTypeDto { Name = "newDataType", ControlToRender = "new Controller" }); Unit.Save(); }
public ActionResult Create(DataTypeDto categoryViewModel) { _dataTypeService.Insert(categoryViewModel); return(RedirectToAction("List")); }