////INSERT- UPDATE - DELETE 
 public int Insert(int PortalId, int ContentItemId, string CultureCode, string RouteName, string RouteUrl, string PhysicalFile,
 bool CheckPhysicalUrlAccess, string RouteValueDictionary, string Description, bool Discontinued)
 {
     int returnValue = 0;
     using (CommonEntities dbContext = new CommonEntities())
     {
         using (System.Transactions.TransactionScope transcope = new System.Transactions.TransactionScope())
         {
             int ListOrder = (from u in dbContext.aspnet_Routes select u.ListOrder).DefaultIfEmpty(0).Max() + 1;
             aspnet_Routes entity = new aspnet_Routes();
             entity.PortalId = PortalId;
             entity.ContentItemId = ContentItemId;
             entity.CultureCode = CultureCode;
             entity.RouteName = RouteName;
             entity.RouteUrl = RouteUrl;
             entity.PhysicalFile = PhysicalFile;
             entity.CheckPhysicalUrlAccess = CheckPhysicalUrlAccess;
             entity.RouteValueDictionary = RouteValueDictionary;
             entity.Description = Description;
             entity.ListOrder = ListOrder;
             entity.Discontinued = Discontinued;
             dbContext.AddToaspnet_Routes(entity);
             returnValue = dbContext.SaveChanges();
             dbContext.Connection.Close();
             transcope.Complete();
         }
     }
     return returnValue;
 }
        /// <summary>
        /// Create a new aspnet_Routes object.
        /// </summary>
        /// <param name="portalId">Initial value of the PortalId property.</param>
        /// <param name="contentItemId">Initial value of the ContentItemId property.</param>
        /// <param name="cultureCode">Initial value of the CultureCode property.</param>
        /// <param name="routeId">Initial value of the RouteId property.</param>
        /// <param name="routeName">Initial value of the RouteName property.</param>
        /// <param name="routeUrl">Initial value of the RouteUrl property.</param>
        /// <param name="physicalFile">Initial value of the PhysicalFile property.</param>
        /// <param name="checkPhysicalUrlAccess">Initial value of the CheckPhysicalUrlAccess property.</param>
        /// <param name="routeValueDictionary">Initial value of the RouteValueDictionary property.</param>
        /// <param name="description">Initial value of the Description property.</param>
        /// <param name="listOrder">Initial value of the ListOrder property.</param>
        /// <param name="discontinued">Initial value of the Discontinued property.</param>
        public static aspnet_Routes Createaspnet_Routes(global::System.Int32 portalId, global::System.Int32 contentItemId, global::System.String cultureCode, global::System.Int32 routeId, global::System.String routeName, global::System.String routeUrl, global::System.String physicalFile, global::System.Boolean checkPhysicalUrlAccess, global::System.String routeValueDictionary, global::System.String description, global::System.Int32 listOrder, global::System.Boolean discontinued)
        {
            aspnet_Routes aspnet_Routes = new aspnet_Routes();

            aspnet_Routes.PortalId               = portalId;
            aspnet_Routes.ContentItemId          = contentItemId;
            aspnet_Routes.CultureCode            = cultureCode;
            aspnet_Routes.RouteId                = routeId;
            aspnet_Routes.RouteName              = routeName;
            aspnet_Routes.RouteUrl               = routeUrl;
            aspnet_Routes.PhysicalFile           = physicalFile;
            aspnet_Routes.CheckPhysicalUrlAccess = checkPhysicalUrlAccess;
            aspnet_Routes.RouteValueDictionary   = routeValueDictionary;
            aspnet_Routes.Description            = description;
            aspnet_Routes.ListOrder              = listOrder;
            aspnet_Routes.Discontinued           = discontinued;
            return(aspnet_Routes);
        }
 /// <summary>
 /// Create a new aspnet_Routes object.
 /// </summary>
 /// <param name="portalId">Initial value of the PortalId property.</param>
 /// <param name="contentItemId">Initial value of the ContentItemId property.</param>
 /// <param name="cultureCode">Initial value of the CultureCode property.</param>
 /// <param name="routeId">Initial value of the RouteId property.</param>
 /// <param name="routeName">Initial value of the RouteName property.</param>
 /// <param name="routeUrl">Initial value of the RouteUrl property.</param>
 /// <param name="physicalFile">Initial value of the PhysicalFile property.</param>
 /// <param name="checkPhysicalUrlAccess">Initial value of the CheckPhysicalUrlAccess property.</param>
 /// <param name="routeValueDictionary">Initial value of the RouteValueDictionary property.</param>
 /// <param name="description">Initial value of the Description property.</param>
 /// <param name="listOrder">Initial value of the ListOrder property.</param>
 /// <param name="discontinued">Initial value of the Discontinued property.</param>
 public static aspnet_Routes Createaspnet_Routes(global::System.Int32 portalId, global::System.Int32 contentItemId, global::System.String cultureCode, global::System.Int32 routeId, global::System.String routeName, global::System.String routeUrl, global::System.String physicalFile, global::System.Boolean checkPhysicalUrlAccess, global::System.String routeValueDictionary, global::System.String description, global::System.Int32 listOrder, global::System.Boolean discontinued)
 {
     aspnet_Routes aspnet_Routes = new aspnet_Routes();
     aspnet_Routes.PortalId = portalId;
     aspnet_Routes.ContentItemId = contentItemId;
     aspnet_Routes.CultureCode = cultureCode;
     aspnet_Routes.RouteId = routeId;
     aspnet_Routes.RouteName = routeName;
     aspnet_Routes.RouteUrl = routeUrl;
     aspnet_Routes.PhysicalFile = physicalFile;
     aspnet_Routes.CheckPhysicalUrlAccess = checkPhysicalUrlAccess;
     aspnet_Routes.RouteValueDictionary = routeValueDictionary;
     aspnet_Routes.Description = description;
     aspnet_Routes.ListOrder = listOrder;
     aspnet_Routes.Discontinued = discontinued;
     return aspnet_Routes;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the aspnet_Routes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToaspnet_Routes(aspnet_Routes aspnet_Routes)
 {
     base.AddObject("aspnet_Routes", aspnet_Routes);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the aspnet_Routes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToaspnet_Routes(aspnet_Routes aspnet_Routes)
 {
     base.AddObject("aspnet_Routes", aspnet_Routes);
 }