public MeasureModel Create(Measure measure) { return new MeasureModel() { Url = _urlHelper.Link("Measures", new { foodid = measure.Food.Id,id=measure.Id }), Description = measure.Description, Calories = Math.Round(measure.Calories) }; }
public MeasureV2Model Create2(Measure measure) { return new MeasureV2Model() { Url = _urlHelper.Link("Measures", new { foodid = measure.Food.Id, id = measure.Id }), Description = measure.Description, Calories = Math.Round(measure.Calories), TotalFat= measure.TotalFat, SaturatedFat =measure.SaturatedFat, Protein =measure.Protein, Carbohydrates =measure.Carbohydrates, Fiber =measure.Fiber, Sugar =measure.Sugar, Sodium =measure.Sodium, Iron =measure.Iron, Cholestrol =measure.Cholestrol }; }