public void CreateTabUrl(TabUrl t) { using (IDataContext ctx = DataContext.Instance()) { var rep = ctx.GetRepository <TabUrl>(); rep.Insert(t); } }
public void CreateTabUrl(TabUrl t) { using (IDataContext ctx = DataContext.Instance()) { var rep = ctx.GetRepository<TabUrl>(); rep.Insert(t); } }
protected void AddTabURL(TabInfo t) { //Temporary solution: Writing directly to table TabUrls //Dont know how to do this in DNN TabUrl tu = new TabUrl(); TabUrlController tc = new TabUrlController(); tu.TabId = t.TabID; tu.SeqNum = 0; tu.Url = "/" + t.Title; tu.QueryString = ""; tu.HttpStatus = "200"; tu.IsSystem = true; tu.PortalAliasUsage = 0; tu.CreatedByUserID = 1; tu.CreatedOnDate = DateTime.Now; tu.LastModifiedByUserID = 1; tu.LastModifiedOnDate = DateTime.Now; tc.CreateTabUrl(tu); }