src/Misc/EFTools/EntityDesign/VisualStudio/RuntimeVersion.cs
// <summary>
//     Returns schema version for a given .NET Framework version. Note it should only be used
//     if there are no references to any of the EF dll (i.e. System.Data.Entity.dll or
//     EntityFramework.dll in the project.
// </summary>
// <param name="netFrameworkVersion">Target .NET Framework version.</param>
// <returns>
//     EF Schema version as it was shipped with the <paramref name="netFrameworkVersion" />.
// </returns>
// <remarks>
//     Should be only used for non-Misc project that does not have references to either
//     System.Data.Entity.dll or EntityFramework.dll
// </remarks>
Returns schema version for a given .NET Framework version. Note it should only be used
if there are no references to any of the EF dll (i.e.
Returns schema version for a given . NET Framework version . Note it should only be used if there are no references to any of the EF dll ( i . e .
public static Version GetSchemaVersionForNetFrameworkVersion(Version netFrameworkVersion)
        {
            Debug.Assert(netFrameworkVersion != null, "netFrameworkVersion != null");
            if (netFrameworkVersion >= NetFrameworkVersioningHelper.NetFrameworkVersion4_5)
            {
                return EntityFrameworkVersion.Version3;
            }
            if (netFrameworkVersion == NetFrameworkVersioningHelper.NetFrameworkVersion4)
            {
                return EntityFrameworkVersion.Version2;
            }
            Debug.Assert(
                netFrameworkVersion == NetFrameworkVersioningHelper.NetFrameworkVersion3_5,
                "Unexpected .NET Framework Version");
            return EntityFrameworkVersion.Version1;
        }
public static Version GetSchemaVersionForNetFrameworkVersion ( Version netFrameworkVersion ) { Debug . Assert ( netFrameworkVersion != null , " " ) ; if ( netFrameworkVersion >= NetFrameworkVersioningHelper . NetFrameworkVersion4_5 ) { return EntityFrameworkVersion . Version3 ; } if ( netFrameworkVersion == NetFrameworkVersioningHelper . NetFrameworkVersion4 ) { return EntityFrameworkVersion . Version2 ; } Debug . Assert ( netFrameworkVersion == NetFrameworkVersioningHelper . NetFrameworkVersion3_5 , " " ) ; return EntityFrameworkVersion . Version1 ; }
Returns schema version for a given .NET Framework version.
Returns schema version for a given . NET Framework version .
EF Schema version as it was shipped with the .
EF Schema version as it was shipped with the .
netFrameworkVersion
Version
Target .NET Framework version.
Target . NET Framework version .
remarks
Should be only used for non-Misc project that does not have references to either
System.Data.Entity.dll or EntityFramework.dll
Should be only used for non - Misc project that does not have references to either System . Data . Entity . dll or EntityFramework . dll