Example #1
0
        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;
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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();  */
        }
Example #5
0
        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;
        }
Example #6
0
        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;
        }
Example #7
0
        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);
        }
Example #8
0
        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();  */
          

        }