public async Task <IActionResult> PostAsync([FromBody] CreateModel model) { var meal = model.MapToMealEntry(); _context.Add(meal); await _context.SaveChangesAsync(); return(CreatedAtAction("GetById", new { id = meal.Id }, meal)); }
public async Task <IActionResult> PostAsync([FromBody] CreateModel model) { var meal = model.MapToMealEntry(); _context.Add(meal); await _context.SaveChangesAsync(); return(CreatedAtAction("GetById", new { id = meal.Id }, meal)); }