public int CrawlerGrabAdd(CrawlerGrab crawlerGrab) { using (OracleConnection conn = DapperHelper.GetConnString()) { conn.Open(); string sql = string.Format("insert into CrawlerGrab values(@CrawlerGrabURL,@CrawlerGrabTitle,@CrawlerGrabContent,@CrawlerGrabPicture,@FirstPictureURL,@CrawlerGrabCreateDate,@CrawlerGrabUpdateDate,@Author,@NewsReleaceDate,@NewsSource,@NewsMark,@NewsTypeID)"); int i = conn.Execute(sql, crawlerGrab); return(i); } }
public int CrawlerGrabUpdate(CrawlerGrab crawlerGrab) { using (OracleConnection conn = DapperHelper.GetConnString()) { conn.Open(); string sql = "Update CrawlerGrab set CrawlerGrabURL=@CrawlerGrabURL,CrawlerGrabTitle=@CrawlerGrabTitle,CrawlerGrabContent=@CrawlerGrabContent,CrawlerGrabPicture=@CrawlerGrabPicture,FirstPictureURL=@FirstPictureURL,CrawlerGrabCreateDate=@CrawlerGrabCreateDate,CrawlerGrabUpdateDate=@CrawlerGrabUpdateDate,Author=@Author,NewsReleaceDate=@NewsReleaceDate,NewsSource=@NewsSource,NewsMark=@NewsMark,@NewsTypeID"; int i = conn.Execute(sql, crawlerGrab); return(i); } }
public int CrawlerGrabUpdate(CrawlerGrab crawlerGrab) { var result = CrawlerGrabService.CrawlerGrabUpdate(crawlerGrab); return(result); }