public void Create(CreateSubSectionDTO dto) { var Subsection = new SubSectionDbEntity(); Subsection.Description = dto.Description; Subsection.Name = dto.Name; Subsection.SectionId = dto.SectionId; _DB.SubSections.Add(Subsection); _DB.SaveChanges(); }
public IActionResult Create([FromBody] CreateSubSectionDTO dto) { _SubsectionService.Create(dto); return(Ok(GetResponse("Added"))); }