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, }); }
public async Task <Create.Response> Create([FromBody] Create.Request request) { return(await _mediator.Send(request)); }