コード例 #1
0
        public void Update(UpdateSubSectionDTO dto)
        {
            var Subsection = _DB.SubSections.SingleOrDefault(x => dto.Id == x.Id && !x.IsDeleted);

            if (Subsection != null)
            {
                Subsection.Name        = dto.Name;
                Subsection.SectionId   = dto.SectionId;
                Subsection.UpdatedAt   = DateTime.Now;
                Subsection.Description = dto.Description;
                _DB.SubSections.Update(Subsection);
                _DB.SaveChanges();
            }
        }
コード例 #2
0
 public IActionResult Update([FromBody] UpdateSubSectionDTO dto)
 {
     _SubsectionService.Update(dto);
     return(Ok(GetResponse("Updated")));
 }