예제 #1
0
 public static Domain.Meal ToMeal(this Create.Request request, Guid accountId)
 {
     return(new Domain.Meal
     {
         Id = Guid.NewGuid(),
         Date = request.Date,
         Time = DateTime.ParseExact(request.Time, ResourceConstant.TimeFormat, CultureInfo.InvariantCulture,
                                    DateTimeStyles.None),
         Text = request.Text,
         Calories = request.Calories,
         AccountId = accountId,
     });
 }
예제 #2
0
 public async Task <Create.Response> Create([FromBody] Create.Request request)
 {
     return(await _mediator.Send(request));
 }