private IActionResult FetchByAlternateKey <T>(String entity, String field, string email) { try { return(Json(ActiveModel.GetRecordByFieldValue <T>(entity, field, email))); } catch (Exception e) { return(NotFoundHandler(e)); } }
private IActionResult ListForField <T>(String entity, String field, int value) { try { return(Json(ActiveModel.GetTableByFieldValue <T>(entity, field, value.ToString()))); } catch (Exception e) { return(NotFoundHandler(e)); } }
private IActionResult FetchById <T>(String entity, int id) { try { return(Json(ActiveModel.GetRecordById <T>(entity, id))); } catch (Exception e) { return(NotFoundHandler(e)); } }
private const int PAGESIZE = 10; // maximum number of items on latest page private IActionResult ListAll <T>(String entity) { try { return(Json(ActiveModel.GetTableForEntity <T>(entity))); } catch (Exception e) { return(NotFoundHandler(e)); } }
private IActionResult ListLatestByFieldValue <T>(String Entity, String Field, String Value) { try { return(Json(ActiveModel.GetLatestByFieldValue <T>(Entity, Field, Value, PAGESIZE))); } catch (Exception e) { return(NotFoundHandler(e)); } }
private IActionResult ListLatest <T>(String entity) { try { return(Json(ActiveModel.GetLatest <T>(entity, PAGESIZE))); } catch (Exception e) { return(NotFoundHandler(e)); } }