Ejemplo n.º 1
0
 public void UpdateApplication(UserApplication application)
 {
     using (CollegeDBContext collegeDBContext = new CollegeDBContext())
     {
         collegeDBContext.Entry(application).State = EntityState.Modified;
         collegeDBContext.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 //
 //Summary:
 //  This method is to Update Department to database
 public void EditDepartment(CollegeDepartment collegeDepartment)
 {
     using (CollegeDBContext collegeDBContext = new CollegeDBContext())
     {
         //SqlParameter Id = new SqlParameter("@ID", collegeDepartment.ID);
         //SqlParameter DeptId = new SqlParameter("@DeptId", collegeDepartment.DeptId);
         //SqlParameter collegeCode = new SqlParameter("@CollegeCode", collegeDepartment.CollegeCode);
         //SqlParameter AvailableSeats = new SqlParameter("@AvailableSeats", collegeDepartment.AvailableSeats);
         //collegeDBContext.Database.ExecuteSqlCommand("CollegeDepartment_Update @ID, @DeptId, @CollegeCode, @AvailableSeats", Id, DeptId, collegeCode, AvailableSeats);
         collegeDBContext.Entry(collegeDepartment).State = EntityState.Modified;
         collegeDBContext.SaveChanges();
     }
 }