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); }
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); }
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); }
public bool Add(models.Type type) => (int)db.Insert(type) > 0;
public bool Add(color color) => (int)db.Insert(color) > 0;
public static bool AddTieba(Tieba T) { DbcontextDB db = new DbcontextDB(); return(Convert.ToInt32(db.Insert(T)) > 0); }
public blog AddBlog(blog blog) { blog.blog_id = (int)db.Insert(blog); return(blog); }