public List <Note> GetNotes() { using (var context = new OstContext()) { return(context.Notes.ToList()); } }
public List <Workflow> GetWorkflows() { using (var context = new OstContext()) { List <Workflow> workflows = (from f in context.OSTForms.Where(x => x.EmployeeUserId != null) join w in context.Workflows.Where(x => x.StatusDescription == "Approved") on f.WorkflowId equals w.WorkflowId select w).ToList(); return(workflows); } }
public List <WorkflowCategory> GetWorkflowCategories() { using (var context = new OstContext()) { List <WorkflowCategory> workflowcategories = (from f in context.OSTForms.Where(x => x.EmployeeUserId != null) join w in context.Workflows.Where(x => x.StatusDescription == "Approved") on f.WorkflowId equals w.WorkflowId join wv in context.WorkflowVersions on w.WorkflowId equals wv.WorkflowId join wc in context.WorkflowCategories on wv.WorkflowVersionId equals wc.WorkflowVersionId select wc).ToList(); return(workflowcategories); } }
public List <OstForm> GetOstForms() { { { using (var context = new OstContext()) { List <OstForm> ostForms = context.OSTForms.Where(x => x.EmployeeUserId != null).ToList(); return(ostForms); } } } }