public static UpdateVisitRequest FromDTO(this UpdateVisitRequestDTO requestDTO, string id)
 {
     return(new UpdateVisitRequest
     {
         Id = id,
         Rate = requestDTO.Rate.Value,
         RestaurantId = requestDTO.RestaurantId,
         UserId = requestDTO.UserId
     });
 }
Example #2
0
        public async Task <ActionResult> Put(string id, [FromBody] UpdateVisitRequestDTO dto)
        {
            await service.UpdateVisit(dto.FromDTO(id));

            return(NoContent());
        }