public HttpResponseMessage Post(HUTModels.Weight model) { WeightBLL bll = new WeightBLL(); if (bll.Insert(model)) { return(new HttpResponseMessage(HttpStatusCode.OK)); } else { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
public IHttpActionResult GetByDateRange(int personId, DateTime startDate, DateTime endDate) { WeightBLL bll = new WeightBLL(); var weights = bll.GetByDateRange(personId, startDate, endDate); if (weights == null) { return(Content(HttpStatusCode.NotFound, "Weights do not exist.")); } else { return(Ok(weights)); } }