public static void InitDB() { if (Session_DB.GetAll <PersonModel>() == null) { Session_DB.Submit <PersonModel>(PersonModel.TestPersons); } }
public static T Read <T>(int id) where T : Model { return(Session_DB.Read <T>(id)); }
public static List <T> GetAll <T>() where T : Model { return(Session_DB.GetAll <T>()); }
public T Insert <T>() where T : Model { this.Id = Model.PK; return(Session_DB.Create <T>((T)this)); }
public T Update <T>() where T : Model { return(Session_DB.Update <T>((T)this)); }
public T Destroy <T>() where T : Model { return(Session_DB.Destroy <T>(this.Id)); }