public List <AccountProxy> GetAccountListByTaskId(int taskId) { using (var db = new DatabaseEntities()) { return(AccountProxy.GetAccountProxyList(db.AccountsTasks.Include(ap => ap.Account1).Where(ap => ap.Task == taskId).Select(ap => ap.Account1).ToList())); } }
public List <AccountProxy> GetAllAccounts() { using (var db = new DatabaseEntities()) { return(AccountProxy.GetAccountProxyList(db.Accounts.ToList())); } }
public List <AccountProxy> GetAccountListByProjectId(int projectId) { using (var db = new DatabaseEntities()) { return(AccountProxy.GetAccountProxyList(db.AccountsProjects.Include(ap => ap.Account1).Where(ap => ap.Project == projectId).Select(ap => ap.Account1).ToList())); } }