public MakerSpaceReadDto CreateMakerSpace(MakerSpaceCreateDto createDto) { var makerSpaceModel = _mapper.Map <MakerSpace>(createDto); _repo.CreateMakerSpace(makerSpaceModel); _repo.SaveChanges(); return(_mapper.Map <MakerSpaceReadDto>(makerSpaceModel)); }
public ActionResult <MakerSpaceReadDto> CreateMakerSpace(MakerSpaceCreateDto createDto) { var makerSpaceModel = _mapper.Map <MakerSpace>(createDto); _repo.CreateMakerSpace(makerSpaceModel); _repo.SaveChanges(); var makerSpaceReadDto = _mapper.Map <MakerSpaceReadDto>(makerSpaceModel); return(CreatedAtRoute(nameof(GetMakerSpaceById), new { Id = makerSpaceReadDto.Id }, makerSpaceReadDto)); }