public IHttpActionResult Get(string range, DateTime start, DateTime end) { //PD: Not send Models because the weird problem with GET date in Web API's //------------------------------------------------------------------------------------------------------ // GUARD EXCEPTIONS Gale.Exception.RestException.Guard(() => start == null, "EMPTY_START_RANGE", API.Errors.ResourceManager); Gale.Exception.RestException.Guard(() => end == null, "EMPTY_END_RANGE", API.Errors.ResourceManager); Gale.Exception.RestException.Guard(() => String.IsNullOrEmpty(range), "EMPTY_RANGE_MODE", API.Errors.ResourceManager); //------------------------------------------------------------------------------------------------------ var filter = new Models.Filter() { end = end.AddDays(1).Date, start = start.Date, range = range }; return new Services.Get(filter, this.User.PrimarySid()); }
public IHttpActionResult Get(string range, DateTime start, DateTime end) { //PD: Not send Models because the weird problem with GET date in Web API's //------------------------------------------------------------------------------------------------------ // GUARD EXCEPTIONS Gale.Exception.RestException.Guard(() => start == null, "EMPTY_START_RANGE", API.Errors.ResourceManager); Gale.Exception.RestException.Guard(() => end == null, "EMPTY_END_RANGE", API.Errors.ResourceManager); Gale.Exception.RestException.Guard(() => String.IsNullOrEmpty(range), "EMPTY_RANGE_MODE", API.Errors.ResourceManager); //------------------------------------------------------------------------------------------------------ var filter = new Models.Filter() { end = end.AddDays(1).Date, start = start.Date, range = range }; return(new Services.Get(filter, this.User.PrimarySid())); }