示例#1
0
        public void EditWork(EditWorkDto editWork)
        {
            var work = db.Works.Where(x => x.Id == editWork.Id).SingleOrDefault();

            work.Title       = editWork.Title;
            work.Description = editWork.Description;
            db.SaveChanges();
        }
示例#2
0
        public void EditWorkAPI(EditWorkDto editWork)
        {
            var work = db.Works.Where(x => x.Id == editWork.Id).SingleOrDefault();

            work.Title        = editWork.Title;
            work.Description  = editWork.Description;
            work.DeveloperId  = "0c3d9737-6590-45d1-8cde-5dcd65369548";
            work.SprintTaskId = 10;

            db.SaveChanges();
        }
示例#3
0
 public IActionResult Edit(EditWorkDto editWorkDto)
 {
     workRepository.EditWork(editWorkDto);
     return(Redirect("GetAllWorks"));
 }
示例#4
0
 public IActionResult EditWork(EditWorkDto editWorkDto)
 {
     developerRepository.EditWork(editWorkDto);
     return(Redirect("ShowWorks"));
 }
 public void Edit([FromBody] EditWorkDto editWork)
 {
     developerRepository.EditWorkAPI(editWork);
 }