Esempio n. 1
0
 public IActionResult Delete([FromRoute] long id)
 {
     return(ControllerUtil.Delete <CityDto, City>(this, _repo, _mapper, city => city.Id == id));
 }
 public IActionResult GetAll([FromQuery]long? salonId, [FromQuery]long? modelId)
 {
   return ControllerUtil.GetFiltered<InventoryDto, Inventory>(this, _repo, _mapper, x =>
     (salonId == null || x.SalonId == salonId) &&
     (modelId == null || x.ModelId == modelId));
 }
Esempio n. 3
0
 public IActionResult Post([FromBody] City city)
 {
     return(ControllerUtil.Post(this, _repo, _mapper, city, updatedModel => new { Id = updatedModel.Id }));
 }
Esempio n. 4
0
 public IActionResult Put(long id, [FromBody] City city)
 {
     return(ControllerUtil.Put(this, _repo, _mapper, city, cityDto => cityDto.Id == id));
 }
Esempio n. 5
0
 public IActionResult GetAll()
 {
     return(ControllerUtil.GetAll <CityDto, City>(this, _repo, _mapper));
 }
Esempio n. 6
0
 public IActionResult Get(long id)
 {
     return(ControllerUtil.Get <CityDto, City>(this, _repo, _mapper, id));
 }
 public IActionResult Delete([FromRoute] long id)
 {
     return(ControllerUtil.Delete <EquipmentDto, Equipment>(this, _repo, _mapper, dto => dto.Id == id));
 }
 public IActionResult Put(long id, [FromBody] Equipment equipment)
 {
     return(ControllerUtil.Put(this, _repo, _mapper, equipment, dto => dto.Id == id));
 }
 public IActionResult Post([FromBody] Equipment equipment)
 {
     return(ControllerUtil.Post(this, _repo, _mapper, equipment, model => new { Id = model.Id }));
 }
 public IActionResult Get(long id)
 {
     return(ControllerUtil.Get <EquipmentDto, Equipment>(this, _repo, _mapper, id));
 }
 public IActionResult GetAll()
 {
     return(ControllerUtil.GetAll <EquipmentDto, Equipment>(this, _repo, _mapper));
 }