public IActionResult GetSubResource(string resource, int id, string subResource)
 {
     try
     {
         return(Json(DBProvider.Select("SELECT * FROM " + subResource + " WHERE " + ResourceMap.TryGetResourceFK(resource) + "=" + id.ToString())));
     }
     catch (Npgsql.PostgresException)
     {
         return(StatusCode(400));
     }
     catch (DBProviderExecuteException)
     {
         return(StatusCode(500));
     }
 }