예제 #1
0
        public Tenant Get(int id)
        {
            var query = new GetTenantByIdQuery {
                TenatId = id
            };

            if (getTenants != null)
            {
                return(getTenant.Handle(query));
            }

            throw new HttpResponseException(HttpStatusCode.NotFound);
        }
예제 #2
0
 public Tenant Handle(GetTenantByIdQuery query)
 {
     return(context.Tenants.Find(query));
 }