public List <tbl_parent_task> getAllParentTasks() { using (ProjectManagerConnection dbContext = new ProjectManagerConnection()) { return(dbContext.tbl_parent_task.ToList()); } }
public List <SP_GETALLTASKS1_Result> GetAllTasks() { using (dbContext = new ProjectManagerConnection()) { return(dbContext.SP_GETALLTASKS1().ToList()); } }
public tbl_task GetTask(int taskId) { using (dbContext = new ProjectManagerConnection()) { return(dbContext.tbl_task.Find(taskId)); } }
public tbl_users GetUser(int UserId) { using (dbContext = new ProjectManagerConnection()) { return(dbContext.tbl_users.Find(UserId)); } }
public List <tbl_users> GetUserList() { using (dbContext = new ProjectManagerConnection()) { return(dbContext.tbl_users.ToList()); } }
public void UpdateTask(tbl_task newTaskDetails) { using (dbContext = new ProjectManagerConnection()) { dbContext.Entry(newTaskDetails).State = EntityState.Modified; dbContext.SaveChanges(); } }
public void CreateTask(tbl_task newTaskDetails) { using (dbContext = new ProjectManagerConnection()) { dbContext.tbl_task.Add(newTaskDetails); dbContext.SaveChanges(); } }
public void UpdateUser(tbl_users userDetail) { using (dbContext = new ProjectManagerConnection()) { dbContext.Entry(userDetail).State = EntityState.Modified; dbContext.SaveChanges(); } }
public void AddUser(tbl_users userDetail) { using (dbContext = new ProjectManagerConnection()) { dbContext.tbl_users.Add(userDetail); dbContext.SaveChanges(); } }
public void UpdateProjectDetail(tbl_project projectDetails) { using (ProjectManagerConnection dbContext = new ProjectManagerConnection()) { dbContext.Entry(projectDetails).State = EntityState.Modified; dbContext.SaveChanges(); } }
public tbl_project GetProjectDetailsById(int projectId) { using (ProjectManagerConnection dbContext = new ProjectManagerConnection()) { return(dbContext.tbl_project.Find(projectId)); } }
public void DeleteUser(int UserId) { using (dbContext = new ProjectManagerConnection()) { var user = dbContext.tbl_users.Find(UserId); dbContext.tbl_users.Remove(user); dbContext.SaveChanges(); } }
public void CreateNewProject(tbl_project projectDetails) { using (ProjectManagerConnection dbContext = new ProjectManagerConnection()) { dbContext.tbl_project.Add(projectDetails); // dbContext.Entry(projectDetails).State = EntityState.Added; dbContext.SaveChanges(); } }
public virtual List <SP_GETALLPROJECTSWITHTASK1_Result> GetProjectList() { using (ProjectManagerConnection dbContext = new ProjectManagerConnection()) { // var project = dbContext.GetProjects(); //return dbContext.tbl_project // .Include(x => x.tbl_task) // .Include(y => y.tbl_users) // .ToList(); return(dbContext.SP_GETALLPROJECTSWITHTASK1().ToList()); } }