public ActionResult EditReferences(int Id = 0) { ApplicationReferenceViewModel model = new ApplicationReferenceViewModel(); if (Id != 0) { var entity = refService.GetById(Id); model = ReferencesMapper.ToViewModel(entity); } ViewBag.ListReferences = refService.GetAll .Where(x => x.IsParent && !x.IsDelete); return(View(model)); }
public void TestGetById() { IReferencesService service = DALBuild.GetObj <IReferencesService>("BLL", "ReferencesService"); Console.WriteLine(service.GetById(2).SchoolName); }