public ActionResult MyCompanys() { var manager = new ManagerRepository(new BaseContext()) .CollectionLoadandGetById(User.Identity.GetUserId <int>(), "Companys"); return(View(CompanyModel.GetCompanyModelList(manager))); }
public List <CompanyModel> getCompanyModels() { var company = new CompanyRepository(new BaseContext()).GetAll().ToList(); foreach (var item in company) { new CompanyRepository(new BaseContext()).CollectionLoad(item, "Houses"); } return(CompanyModel.GetCompanyModelList(company)); }