public async Task <ActionResult> PutAuction([FromRoute][Required] int id, [FromBody] PutAuctionRequest model) { var response = await _updateAuctionFlow.Execute(PutAuctionRequestToAuctionEntity.Translate(model), id); var translateResponse = PostAuctionEntityToPostAuctionResponse.Translate(response); return(Ok(translateResponse)); }
public static Auction Translate(PutAuctionRequest model) => model != null?Auction.Create( userId : model.UserId, name : model.Name, initialValue : model.InitialValue, used : model.Used, startDate : model.StartDate, endDate : model.EndDate ) : Auction.Create();