public JsonResult Add([FromBody] FloorVM model) { var floor = Mapper.Map <Floor>(model); _floorService.Add(floor); _floorService.SaveChanges(); return(Json(_floorService.Get(floor.Id))); }
// GET: api/Floor public IEnumerable <FloorDTO> Get() { return(floorService.Get()); }