public static object cDeleteEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.Where( e => (e.ID == obj.ID) ).First(); db.TEST_SYSTEM.DeleteObject(obReturn); db.SaveChanges(); return true; }
public static object cDeleteEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.Where( e => (e.ID == obj.ID) ).First(); db.TEST_SYSTEM.DeleteObject(obReturn); db.SaveChanges(); return(true); }
public static object cInsertEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); Entity.TEST_SYSTEM ob = new Entity.TEST_SYSTEM(); ob.NAME = obj.NAME; ob.SYSTEM_NAME = "entity"; ob.EMAIL = obj.EMAIL; db.TEST_SYSTEM.AddObject(ob); db.SaveChanges(); return(true); }
public static object cSelectEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.Where( e => e.SYSTEM_NAME == "entity" ).ToList(); return(obReturn); /*return db.ExecuteStoreQuery<MODEL.QueryModel>(" select * from TEST_SYSTEM ").ToList(); */ }
public static object cInsertEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); Entity.TEST_SYSTEM ob = new Entity.TEST_SYSTEM(); ob.NAME = obj.NAME; ob.SYSTEM_NAME = "entity"; ob.EMAIL = obj.EMAIL; db.TEST_SYSTEM.AddObject(ob); db.SaveChanges(); return true; }
public static object cUpdateEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.First( e => (e.SYSTEM_NAME == "entity") && (e.ID == obj.ID) ); obReturn.NAME = obj.NAME; obReturn.EMAIL = obj.EMAIL; db.SaveChanges(); return true; }
public static object cUpdateEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.First( e => (e.SYSTEM_NAME == "entity") && (e.ID == obj.ID) ); obReturn.NAME = obj.NAME; obReturn.EMAIL = obj.EMAIL; db.SaveChanges(); return(true); }
public static object cSelectEntity(MODEL.Query obj) { Entity.silkspanEntities db = new Entity.silkspanEntities(); var obReturn = db.TEST_SYSTEM.Where( e => e.SYSTEM_NAME=="entity" ).ToList(); return obReturn; /*return db.ExecuteStoreQuery<MODEL.QueryModel>(" select * from TEST_SYSTEM ").ToList(); */ }