/// <summary> /// Function to update a homework /// </summary> /// <param name="id">id of the homework to be updated</param> /// <param name="desc">new description of the homework</param> /// <param name="receivingWeek">new receiving week </param> /// <param name="deadlineWeek">new deadline week</param> /// <returns>null if the homework was updated, the given homework otherwise</returns> public Homework UpdateHomework(string id, string desc, int receivingWeek, int deadlineWeek) { return(_hwRepo.Update(new Homework(id, desc, receivingWeek, deadlineWeek))); }
public HttpResponseMessage Put(int id, Cidade cidade) { _repository.Update <Cidade>(cidade); _repository.Commit(); return(Request.CreateResponse(HttpStatusCode.OK)); }
public async Task <IActionResult> UpdateEmployee(int id, [FromBody] Employee employee) { await _employeeRepository.Update(employee, id); return(new JsonResult("Updated")); }
public HttpResponseMessage Put(int id, Estado estado) { _repository.Update <Estado>(estado); _repository.Commit(); return(Request.CreateResponse(HttpStatusCode.OK)); }
/// <summary> /// Function to update /// </summary> /// <param name="stId"></param> /// <param name="hwId"></param> /// <param name="gradeValue"></param> /// <param name="professor"></param> /// <param name="feedback"></param> /// <returns>null if the grade was updated, the given grade otherwise</returns> public Grade UpdateGrade(int stId, string hwId, double gradeValue, string professor, string feedback) { return(_grRepo.Update(new Grade(stId, hwId, gradeValue, professor, feedback))); }
public HttpResponseMessage Put(int id, Pais pais) { _repository.Update <Pais>(pais); _repository.Commit(); return(Request.CreateResponse(HttpStatusCode.OK)); }
/// <summary> /// Function to update a student /// </summary> /// <param name="id">id of the student to be updated</param> /// <param name="name">name of the student to be updated</param> /// <param name="group">group of the student</param> /// <param name="email">email of the student</param> /// <returns>null if the student was updated, the given student otherwise</returns> public Student UpdateStudent(int id, string name, int group, string email) { return(_studRepo.Update(new Student(id, name, group, email))); }