public async Task <HttpResponseMessage> AddAnOfferAsync([FromBody] OfferBl offer) { try { var offerId = await _offerService.AddAnOfferAsync(offer); return(Request.CreateResponse(HttpStatusCode.OK, offerId)); } catch (Exception e) { var message = $"Adding new offer failde. {e.Message}"; return(Request.CreateResponse(HttpStatusCode.BadRequest, message)); } }
public async Task AddAnOfferAsync(OfferBl offerBl) { await _offerService.AddAnOfferAsync(offerBl); }