Пример #1
0
        public static bool InsertTieba(Tieba Tb)
        {
            bool        ok;
            DbcontextDB db  = new DbcontextDB();
            int         row = Convert.ToInt32(db.Insert(Tb));

            return(row == 1 ? ok = false : ok = true);
        }
Пример #2
0
        public static bool Insert(Crawler cl)
        {
            bool        ok;
            DbcontextDB db  = new DbcontextDB();
            int         row = Convert.ToInt32(db.Insert(cl));

            return(row == 1 ? ok = false : ok = true);
        }
Пример #3
0
        public admin Registered(admin admin)
        {
            var user = db.FirstOrDefault <admin>("select * from [admin] where email=@0", admin.email);

            if (user == null)
            {
                admin.password = common.common.MD5(admin.password);
                admin.id       = (int)db.Insert(admin);
                return(admin);
            }
            return(null);
        }
Пример #4
0
 public bool Add(models.Type type) => (int)db.Insert(type) > 0;
Пример #5
0
 public bool Add(color color) => (int)db.Insert(color) > 0;
Пример #6
0
        public static bool AddTieba(Tieba T)
        {
            DbcontextDB db = new DbcontextDB();

            return(Convert.ToInt32(db.Insert(T)) > 0);
        }
Пример #7
0
 public blog AddBlog(blog blog)
 {
     blog.blog_id = (int)db.Insert(blog);
     return(blog);
 }