public Tenant Get(int id) { var query = new GetTenantByIdQuery { TenatId = id }; if (getTenants != null) { return(getTenant.Handle(query)); } throw new HttpResponseException(HttpStatusCode.NotFound); }
public Tenant Handle(GetTenantByIdQuery query) { return(context.Tenants.Find(query)); }