public TrackedDayRecordViewModel() { DrinkTypes = Mapper.Map <ObservableCollection <DrinkTypeViewModel> >(DrinkTypesService.GetAll()); DrinkType = DrinkTypes.FirstOrDefault(); Time = DateTime.Now.TimeOfDay; Volume = _step; DecreasePortionCommand = new Command(DecreasePortion); IncreasePortionCommand = new Command(IncreasePortion); }
public IHttpActionResult Get() { try { var res = DrinkTypesService.Get().Select(d => new { d.Id, d.Description, d.AlcoholContent }); return(Ok(res)); } catch (Exception e) { return(NotFound()); } }