public static FriendViewList CreateFriendViewListFromAppUserEditView(ApplicationDbContext db, Guid appUserId, string url) { List <FriendView> userFriendListView = FriendViewHelpers.GetFriendViewByType(db, appUserId, LevelEnum.User); List <FriendView> userBranchFriendListView = FriendViewHelpers.GetFriendViewByType(db, appUserId, LevelEnum.Branch); List <FriendView> userCompanyFriendListView = FriendViewHelpers.GetFriendViewByType(db, appUserId, LevelEnum.Company); FriendViewList list = new FriendViewList() { UserFriendListView = userFriendListView, UserBranchFriendListView = userBranchFriendListView, UserCompanyFriendListView = userCompanyFriendListView, CallingUrl = url }; return(list); }
// GET: AppUsers Friends public ActionResult FriendIndex(Guid appUserId, string url) { FriendViewList model = FriendViewHelpers.CreateFriendViewListFromAppUserEditView(db, appUserId, url); return(View(model)); }