public ActionResult <BandDto> CreateBand(CreateBandDto bandDto) { var band = _mapper.Map <Band>(bandDto); _repository.AddBand(band); _repository.Save(); var bandToReturn = _mapper.Map <BandDto>(band); return(CreatedAtRoute("GetBand", new { bandId = band.Id }, bandToReturn)); }
public IActionResult Post([FromBody] CreateBandDto band) { //Call a method to add a new record to the entity return(Ok()); }