Click here to Skip to main content
15,881,380 members
Articles / Programming Languages / C# 4.0

A Random Walk Through of the LightSwitch Data Model

Rate me:
Please Sign up or sign in to vote.
4.93/5 (20 votes)
10 Sep 2011Ms-PL4 min read 41.3K   563   22  
We will create a Silverlight Custom Control called “LightSwitch Explorer” that will display information about the collections of the screen that it is displayed on, raise methods, and switch screens.
  • LightSwitchExplorer.zip
    • LightSwitchExplorer.sln
    • LightSwitchExplorer
      • _Pvt_Extensions
        • Microsoft.LightSwitch.Extensions
          • Client
            • DebugOnlyRef
              • Microsoft.LightSwitch.Extensions.Design.Client.dll
          • ClientGen
            • Reference
              • ar
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • bg
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • ca
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • cs
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • da
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • de
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • el
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • es
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • et
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • eu
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • fi
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • fr
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • he
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • hr
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • hu
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • id
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • it
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • ja
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • ko
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • lt
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • lv
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • Microsoft.LightSwitch.Extensions.Client.dll
              • ms
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • nl
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • no
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • pl
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • pt
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • pt-BR
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • ro
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • ru
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • sk
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • sl
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • sr-Cyrl-CS
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • sr-Latn-CS
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • sv
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • th
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • tr
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • uk
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • vi
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • zh-Hans
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
              • zh-Hant
                • Microsoft.LightSwitch.Extensions.Client.Resources.dll
          • IDE
            • Reference
              • de
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • es
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • fr
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • it
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • ja
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • ko
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • Microsoft.LightSwitch.Extensions.Design.dll
              • ru
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • zh-Hans
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
              • zh-Hant
                • Microsoft.LightSwitch.Extensions.Design.Resources.dll
          • LsPkgLastWriteTime.txt
          • ServerGen
            • Reference
              • ar
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • bg
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • ca
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • cs
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • da
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • de
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • el
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • es
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • et
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • eu
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • fi
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • fr
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • he
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • hr
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • hu
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • id
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • it
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • ja
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • ko
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • lt
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • lv
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • Microsoft.LightSwitch.Extensions.Server.dll
              • ms
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • nl
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • no
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • pl
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • pt
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • pt-BR
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • ro
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • ru
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • sk
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • sl
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • sr-Cyrl-CS
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • sr-Latn-CS
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • sv
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • th
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • tr
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • uk
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • vi
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • zh-Hans
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
              • zh-Hant
                • Microsoft.LightSwitch.Extensions.Server.Resources.dll
      • app.config
      • Bin
        • Data
          • ApplicationDatabase.mdf
          • ApplicationDatabase_log.ldf
          • Temp
        • Debug
          • bin
            • ar
            • bg
            • ca
            • cs
            • da
            • de
            • el
            • es
            • et
            • eu
            • fi
            • fr
            • he
            • hr
            • hu
            • id
            • it
            • ja
            • ko
            • lt
            • lv
            • Microsoft.LightSwitch.Design.Server.Internal.dll
            • ms
            • nl
            • no
            • pl
            • pt
            • pt-BR
            • ro
            • ru
            • sk
            • sl
            • sr-Cyrl-CS
            • sr-Latn-CS
            • sv
            • th
            • tr
            • uk
            • vi
            • zh-Hans
            • zh-Hant
          • Data
          • VslsHost.exe
          • Web
            • Manifests
              • Microsoft.LightSwitch.Design.Server.Manifest.dll
      • Client
      • ClientGenerated
      • Common
      • Data
        • ApplicationDefinition.lsml
      • default.htm
      • LightSwitchExplorer.lsproj
      • LightSwitchExplorer.lsproj.user
      • Server
      • ServerGenerated
      • ServiceConfiguration.cscfg
      • ServiceDefinition.csdef
      • Silverlight.js
    • SilverlightControlLibrary

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace LightSwitchApplication
{
    #region Entities
    
    /// <summary>
    /// No Modeled Description Available
    /// </summary>
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
    public sealed partial class Product : global::Microsoft.LightSwitch.Framework.Base.EntityObject<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new instance of the Product entity.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public Product()
            : this(null)
        {
        }
    
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public Product(global::Microsoft.LightSwitch.Framework.EntitySet<global::LightSwitchApplication.Product> entitySet)
            : base(entitySet)
        {
            global::LightSwitchApplication.Product.DetailsClass.Initialize(this);
        }
    
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void Product_Created();
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void Product_AllowSaveWithErrors(ref bool result);
    
        #endregion
    
        #region Private Properties
        
        /// <summary>
        /// Gets the Application object for this application.  The Application object provides access to active screens, methods to open screens and access to the current user.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::Microsoft.LightSwitch.IApplication<global::LightSwitchApplication.DataWorkspace> Application
        {
            get
            {
                return global::LightSwitchApplication.Application.Current;
            }
        }
        
        /// <summary>
        /// Gets the containing data workspace.  The data workspace provides access to all data sources in the application.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::LightSwitchApplication.DataWorkspace DataWorkspace
        {
            get
            {
                return (global::LightSwitchApplication.DataWorkspace)this.Details.EntitySet.Details.DataService.Details.DataWorkspace;
            }
        }
        
        #endregion
    
        #region Public Properties
    
        /// <summary>
        /// No Modeled Description Available
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public int Id
        {
            get
            {
                return global::LightSwitchApplication.Product.DetailsClass.GetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.Id);
            }
            set
            {
                global::LightSwitchApplication.Product.DetailsClass.SetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.Id, value);
            }
        }
        
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void Id_IsReadOnly(ref bool result);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void Id_Validate(global::Microsoft.LightSwitch.EntityValidationResultsBuilder results);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void Id_Changed();

        /// <summary>
        /// No Modeled Description Available
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public string ProductName
        {
            get
            {
                return global::LightSwitchApplication.Product.DetailsClass.GetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductName);
            }
            set
            {
                global::LightSwitchApplication.Product.DetailsClass.SetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductName, value);
            }
        }
        
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductName_IsReadOnly(ref bool result);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductName_Validate(global::Microsoft.LightSwitch.EntityValidationResultsBuilder results);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductName_Changed();

        /// <summary>
        /// No Modeled Description Available
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public decimal ProductPrice
        {
            get
            {
                return global::LightSwitchApplication.Product.DetailsClass.GetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductPrice);
            }
            set
            {
                global::LightSwitchApplication.Product.DetailsClass.SetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductPrice, value);
            }
        }
        
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductPrice_IsReadOnly(ref bool result);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductPrice_Validate(global::Microsoft.LightSwitch.EntityValidationResultsBuilder results);
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        partial void ProductPrice_Changed();

        /// <summary>
        /// No Modeled Description Available
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public global::Microsoft.LightSwitch.Framework.EntityCollection<global::LightSwitchApplication.OrderDetail> OrderDetails
        {
            get
            {
                return global::LightSwitchApplication.Product.DetailsClass.GetValue(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.OrderDetails);
            }
        }
        
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public Microsoft.LightSwitch.IDataServiceQueryable<global::LightSwitchApplication.OrderDetail> OrderDetailsQuery
        {
            get
            {
                return global::LightSwitchApplication.Product.DetailsClass.GetQuery(this, global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.OrderDetails);
            }
        }

        #endregion
    
        #region Details Class
    
        [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
        [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public sealed class DetailsClass : global::Microsoft.LightSwitch.Details.Framework.Base.EntityDetails<
                global::LightSwitchApplication.Product,
                global::LightSwitchApplication.Product.DetailsClass,
                global::LightSwitchApplication.Product.DetailsClass.IImplementation,
                global::LightSwitchApplication.Product.DetailsClass.PropertySet,
                global::Microsoft.LightSwitch.Details.Framework.EntityCommandSet<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>,
                global::Microsoft.LightSwitch.Details.Framework.EntityMethodSet<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>>
        {
    
            static DetailsClass()
            {
                var initializeEntry = global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.Id;
            }
    
            [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
            private static readonly global::Microsoft.LightSwitch.Details.Framework.Base.EntityDetails<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>.Entry
                __ProductEntry = new global::Microsoft.LightSwitch.Details.Framework.Base.EntityDetails<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>.Entry(
                    global::LightSwitchApplication.Product.DetailsClass.__Product_CreateNew,
                    global::LightSwitchApplication.Product.DetailsClass.__Product_Created,
                    global::LightSwitchApplication.Product.DetailsClass.__Product_AllowSaveWithErrors);
            private static global::LightSwitchApplication.Product __Product_CreateNew(global::Microsoft.LightSwitch.Framework.EntitySet<global::LightSwitchApplication.Product> es)
            {
                return new global::LightSwitchApplication.Product(es);
            }
            private static void __Product_Created(global::LightSwitchApplication.Product e)
            {
                e.Product_Created();
            }
            private static bool __Product_AllowSaveWithErrors(global::LightSwitchApplication.Product e)
            {
                bool result = false;
                e.Product_AllowSaveWithErrors(ref result);
                return result;
            }
    
            public DetailsClass() : base()
            {
            }
    
            public new global::Microsoft.LightSwitch.Details.Framework.EntityCommandSet<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass> Commands
            {
                get
                {
                    return base.Commands;
                }
            }
    
            public new global::Microsoft.LightSwitch.Details.Framework.EntityMethodSet<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass> Methods
            {
                get
                {
                    return base.Methods;
                }
            }
    
            public new global::LightSwitchApplication.Product.DetailsClass.PropertySet Properties
            {
                get
                {
                    return base.Properties;
                }
            }
    
            [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
            [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public sealed class PropertySet : global::Microsoft.LightSwitch.Details.Framework.Base.EntityPropertySet<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass>
            {
    
                public PropertySet() : base()
                {
                }
    
                public global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int> Id
                {
                    get
                    {
                        return base.GetItem(global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.Id) as global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int>;
                    }
                }
                
                public global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string> ProductName
                {
                    get
                    {
                        return base.GetItem(global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductName) as global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string>;
                    }
                }
                
                public global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal> ProductPrice
                {
                    get
                    {
                        return base.GetItem(global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.ProductPrice) as global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal>;
                    }
                }
                
                public global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail> OrderDetails
                {
                    get
                    {
                        return base.GetItem(global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.OrderDetails) as global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail>;
                    }
                }
                
            }
    
            #pragma warning disable 109
            [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
            public interface IImplementation : global::Microsoft.LightSwitch.Internal.IEntityImplementation
            {
                new int Id { get; set; }
                new string ProductName { get; set; }
                new decimal ProductPrice { get; set; }
                new global::System.Collections.IEnumerable OrderDetails { get; }
            }
            #pragma warning restore 109
    
            [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.LightSwitch.BuildTasks.CodeGen", "10.0.0.0")]
            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
            internal class PropertySetProperties
            {
    
                [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
                public static readonly global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int>.Entry
                    Id = new global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int>.Entry(
                        "Id",
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_Stub,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_ComputeIsReadOnly,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_Validate,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_GetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_SetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._Id_OnValueChanged);
                private static void _Id_Stub(global::Microsoft.LightSwitch.Details.Framework.Base.DetailsCallback<global::LightSwitchApplication.Product.DetailsClass, global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int>.Data> c, global::LightSwitchApplication.Product.DetailsClass d, object sf)
                {
                    c(d, ref d._Id, sf);
                }
                private static bool _Id_ComputeIsReadOnly(global::LightSwitchApplication.Product e)
                {
                    bool result = false;
                    e.Id_IsReadOnly(ref result);
                    return result;
                }
                private static void _Id_Validate(global::LightSwitchApplication.Product e, global::Microsoft.LightSwitch.EntityValidationResultsBuilder r)
                {
                    e.Id_Validate(r);
                }
                private static int _Id_GetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d)
                {
                    return d.ImplementationEntity.Id;
                }
                private static void _Id_SetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d, int v)
                {
                    d.ImplementationEntity.Id = v;
                }
                private static void _Id_OnValueChanged(global::LightSwitchApplication.Product e)
                {
                    e.Id_Changed();
                }
    
                [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
                public static readonly global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string>.Entry
                    ProductName = new global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string>.Entry(
                        "ProductName",
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_Stub,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_ComputeIsReadOnly,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_Validate,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_GetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_SetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductName_OnValueChanged);
                private static void _ProductName_Stub(global::Microsoft.LightSwitch.Details.Framework.Base.DetailsCallback<global::LightSwitchApplication.Product.DetailsClass, global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string>.Data> c, global::LightSwitchApplication.Product.DetailsClass d, object sf)
                {
                    c(d, ref d._ProductName, sf);
                }
                private static bool _ProductName_ComputeIsReadOnly(global::LightSwitchApplication.Product e)
                {
                    bool result = false;
                    e.ProductName_IsReadOnly(ref result);
                    return result;
                }
                private static void _ProductName_Validate(global::LightSwitchApplication.Product e, global::Microsoft.LightSwitch.EntityValidationResultsBuilder r)
                {
                    e.ProductName_Validate(r);
                }
                private static string _ProductName_GetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d)
                {
                    return d.ImplementationEntity.ProductName;
                }
                private static void _ProductName_SetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d, string v)
                {
                    d.ImplementationEntity.ProductName = v;
                }
                private static void _ProductName_OnValueChanged(global::LightSwitchApplication.Product e)
                {
                    e.ProductName_Changed();
                }
    
                [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
                public static readonly global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal>.Entry
                    ProductPrice = new global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal>.Entry(
                        "ProductPrice",
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_Stub,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_ComputeIsReadOnly,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_Validate,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_GetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_SetImplementationValue,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._ProductPrice_OnValueChanged);
                private static void _ProductPrice_Stub(global::Microsoft.LightSwitch.Details.Framework.Base.DetailsCallback<global::LightSwitchApplication.Product.DetailsClass, global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal>.Data> c, global::LightSwitchApplication.Product.DetailsClass d, object sf)
                {
                    c(d, ref d._ProductPrice, sf);
                }
                private static bool _ProductPrice_ComputeIsReadOnly(global::LightSwitchApplication.Product e)
                {
                    bool result = false;
                    e.ProductPrice_IsReadOnly(ref result);
                    return result;
                }
                private static void _ProductPrice_Validate(global::LightSwitchApplication.Product e, global::Microsoft.LightSwitch.EntityValidationResultsBuilder r)
                {
                    e.ProductPrice_Validate(r);
                }
                private static decimal _ProductPrice_GetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d)
                {
                    return d.ImplementationEntity.ProductPrice;
                }
                private static void _ProductPrice_SetImplementationValue(global::LightSwitchApplication.Product.DetailsClass d, decimal v)
                {
                    d.ImplementationEntity.ProductPrice = v;
                }
                private static void _ProductPrice_OnValueChanged(global::LightSwitchApplication.Product e)
                {
                    e.ProductPrice_Changed();
                }
    
                [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
                public static readonly global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail>.Entry
                    OrderDetails = new global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail>.Entry(
                        "OrderDetails",
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._OrderDetails_Stub,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._OrderDetails_GetReferencedEntities,
                        global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties._OrderDetails_GetEntityCollection);
                private static void _OrderDetails_Stub(global::Microsoft.LightSwitch.Details.Framework.Base.DetailsCallback<global::LightSwitchApplication.Product.DetailsClass, global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail>.Data> c, global::LightSwitchApplication.Product.DetailsClass d, object sf)
                {
                    c(d, ref d._OrderDetails, sf);
                }
                private static global::System.Collections.Generic.IEnumerable<global::LightSwitchApplication.OrderDetail> _OrderDetails_GetReferencedEntities(global::LightSwitchApplication.Product.DetailsClass d)
                {
                    return d.GetReferencedEntities<global::LightSwitchApplication.OrderDetail, global::LightSwitchApplication.OrderDetail.DetailsClass>(global::LightSwitchApplication.Product.DetailsClass.PropertySetProperties.OrderDetails, ref d._OrderDetails);
                }
                private static global::System.Collections.IEnumerable _OrderDetails_GetEntityCollection(global::LightSwitchApplication.Product.DetailsClass d)
                {
                    return d.ImplementationEntity.OrderDetails;
                }
    
            }
    
            [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
            private global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, int>.Data _Id;
            
            [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
            private global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, string>.Data _ProductName;
            
            [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
            private global::Microsoft.LightSwitch.Details.Framework.EntityStorageProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, decimal>.Data _ProductPrice;
            
            [global::System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]
            private global::Microsoft.LightSwitch.Details.Framework.EntityCollectionProperty<global::LightSwitchApplication.Product, global::LightSwitchApplication.Product.DetailsClass, global::LightSwitchApplication.OrderDetail>.Data _OrderDetails;
            
        }
    
        #endregion
    }
    
    #endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior) http://ADefWebserver.com
United States United States
Michael Washington is a Microsoft MVP. He is a ASP.NET and
C# programmer.
He is the founder of
AiHelpWebsite.com,
LightSwitchHelpWebsite.com, and
HoloLensHelpWebsite.com.

He has a son, Zachary and resides in Los Angeles with his wife Valerie.

He is the Author of:

Comments and Discussions