Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public bool Add(models.Type type) => (int)db.Insert(type) > 0;
Exemplo n.º 5
0
 public bool Add(color color) => (int)db.Insert(color) > 0;
Exemplo n.º 6
0
        public static bool AddTieba(Tieba T)
        {
            DbcontextDB db = new DbcontextDB();

            return(Convert.ToInt32(db.Insert(T)) > 0);
        }
Exemplo n.º 7
0
 public blog AddBlog(blog blog)
 {
     blog.blog_id = (int)db.Insert(blog);
     return(blog);
 }