public void Remove(Models.UrlPageInfo item) { DbCommand comm = this.GetCommand("UrlPageInfo_Delete"); comm.AddParameter <string>(this.Factory, "Url", item.Url); this.SafeExecuteNonQuery(comm); }
public void Add(Models.UrlPageInfo item) { DbCommand comm = this.GetCommand("UrlPageInfo_Insert"); comm.AddParameter <string>(this.Factory, "Url", item.Url); comm.AddParameter <string>(this.Factory, "PageTitle", item.PageTitle); comm.AddParameter <string>(this.Factory, "MetaKeyword", item.MetaKeyword); comm.AddParameter <string>(this.Factory, "MetaDescription", item.MetaDescription); comm.AddParameter <string>(this.Factory, "MetaRobots", item.MetaRobots); this.SafeExecuteNonQuery(comm); }
public Models.UrlPageInfo Get(Models.UrlPageInfo dummy) { DbCommand comm = this.GetCommand("UrlPageInfo_Get"); comm.AddParameter <string>(this.Factory, "Url", dummy.Url); DataTable dt = this.GetTable(comm); return(EntityBase.ParseListFromTable <UrlPageInfo>(dt).FirstOrDefault()); }
public void Update(Models.UrlPageInfo @new, Models.UrlPageInfo old) { var item = @new; item.Url = old.Url; DbCommand comm = this.GetCommand("UrlPageInfo_Update"); comm.AddParameter <string>(this.Factory, "Url", item.Url); comm.AddParameter <string>(this.Factory, "PageTitle", item.PageTitle); comm.AddParameter <string>(this.Factory, "MetaKeyword", item.MetaKeyword); comm.AddParameter <string>(this.Factory, "MetaDescription", item.MetaDescription); comm.AddParameter <string>(this.Factory, "MetaRobots", item.MetaRobots); this.SafeExecuteNonQuery(comm); }