Пример #1
0
 /// <summary>
 /// Create a new PortalAlia object.
 /// </summary>
 /// <param name="portalAliasID">Initial value of the PortalAliasID property.</param>
 /// <param name="createDate">Initial value of the CreateDate property.</param>
 /// <param name="portalID">Initial value of the PortalID property.</param>
 /// <param name="hTTPAlias">Initial value of the HTTPAlias property.</param>
 /// <param name="createdByUserID">Initial value of the CreatedByUserID property.</param>
 public static PortalAlia CreatePortalAlia(global::System.Int32 portalAliasID, global::System.DateTime createDate, global::System.Int32 portalID, global::System.String hTTPAlias, global::System.Int32 createdByUserID)
 {
     PortalAlia portalAlia = new PortalAlia();
     portalAlia.PortalAliasID = portalAliasID;
     portalAlia.CreateDate = createDate;
     portalAlia.PortalID = portalID;
     portalAlia.HTTPAlias = hTTPAlias;
     portalAlia.CreatedByUserID = createdByUserID;
     return portalAlia;
 }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the PortalAlias EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPortalAlias(PortalAlia portalAlia)
 {
     base.AddObject("PortalAlias", portalAlia);
 }
Пример #3
0
 /// <summary>
 /// Uses a hashtable of values to create and insert a new PortalAlias entity into the database
 /// </summary>
 /// <param name="values">The hashtable</param>
 public static void Insert(Hashtable values)
 {
     using (var context = new EntitiesContext())
     {
         DAL.PortalAlia r = new DAL.PortalAlia
         {
             CreateDate = DateTime.Now,
             PortalID = int.Parse(values["PortalID"].ToString()),
             HTTPAlias = values["HTTPAlias"].ToString(),
             LastModifiedByUserID = (Int32)HttpContext.Current.Session["UserID"]
         };
         context.AddToPortalAlias(r);
         context.SaveChanges();
     }
 }