Beispiel #1
0
        public virtual IHttpActionResult Get([UrlArray] int[] ids, string include = null)
        {
            TDto[] dtos = this.Service.Get(ids)
                          .WithOptions(QueryOptions <TDmn, TDto, TPermissions> .FromRequestUri(this.Request.RequestUri))
                          .ToArray();

            return(dtos != null ?
                   (IHttpActionResult)this.Ok(dtos) : this.NotFound());
        }
Beispiel #2
0
        public virtual IHttpActionResult Get(int id)
        {
            TDto dto = this.Service.Get(id)
                       .WithOptions(QueryOptions <TDmn, TDto, TPermissions> .FromRequestUri(this.Request.RequestUri))
                       .FirstOrDefault();

            return(dto != null ?
                   (IHttpActionResult)this.Ok(dto) : this.NotFound());
        }