public override UiView Details(long?id, IMDResponse res = null) { if (id == null) { return(new ViewBuilder <EmployeeVM>(DetailsPage, res).Details()); } var vm = uw.QueryEntity <Employee>().GetByID <EmployeeVM>(id, false, IncludeProps.ToArray()); if (vm != null) { vm.UserAccountVM = vm.UserAccount.To <UserAccountVM>(); } return(new ViewBuilder <EmployeeVM>(DetailsPage, res).Details(vm)); }
public virtual UiView Details(long?id, IMDResponse res = null) => (id.HasValue) ? new ViewBuilder <TViewModel>(DetailsPage, res).Details(uw.QueryEntity <TEntity>().GetByID <TViewModel>(id, false, IncludeProps?.ToArray())) : new ViewBuilder <TViewModel>(DetailsPage, res).Details();
public virtual UiView List(TViewModel vm, IMDResponse res = null) => new ViewBuilder <TViewModel>(ListPage, res).List(uw.QueryEntity <TEntity>().GetListFiltered <TViewModel>(Filters, IncludeProps?.ToArray()));