├── src ├── EcmaPublicKey.snk ├── EntityFramework │ ├── Properties │ │ ├── Resources.Migrate.tt │ │ ├── Resources.PowerShell.tt │ │ └── AssemblyVersion.cs │ ├── Infrastructure │ │ ├── IDbModelCacheKeyProvider.cs │ │ ├── IDbModelCacheKeyFactory.cs │ │ ├── IDbModelCacheKey.cs │ │ ├── ICancelableDbCommandInterceptor.cs │ │ ├── IEntityConnectionInterceptor.cs │ │ ├── ProviderInvariantName.cs │ │ ├── IProviderInvariantName.cs │ │ ├── DefaultDbProviderFactoryService.cs │ │ └── IDbInterceptor.cs │ ├── Core │ │ ├── Mapping │ │ │ ├── ViewGeneration │ │ │ │ ├── Structures │ │ │ │ │ ├── ViewTarget.cs │ │ │ │ │ └── CellTreeOpType.cs │ │ │ │ ├── QueryRewriting │ │ │ │ │ ├── ITileQuery.cs │ │ │ │ │ └── TileOpKind.cs │ │ │ │ ├── ViewGenMode.cs │ │ │ │ ├── ViewGenTraceLevel.cs │ │ │ │ ├── ViewAssemblyChecker.cs │ │ │ │ └── PerfType.cs │ │ │ ├── MemberMappingKind.cs │ │ │ ├── FunctionImportReturnTypeScalarPropertyMapping.cs │ │ │ ├── StructuralTypeMapping.cs │ │ │ ├── ObjectMslConstructs.cs │ │ │ └── FunctionImportReturnTypePropertyMapping.cs │ │ ├── Metadata │ │ │ └── Edm │ │ │ │ ├── INamedDataModelItem.cs │ │ │ │ ├── PropertyKind.cs │ │ │ │ ├── IMetadataItem.cs │ │ │ │ ├── MetadataArtifactAssemblyResolver.cs │ │ │ │ ├── EdmSchemaErrorSeverity.cs │ │ │ │ ├── ValidationSeverity.cs │ │ │ │ └── EdmItemError.cs │ │ ├── SchemaObjectModel │ │ │ ├── AddErrorKind.cs │ │ │ ├── Operation.cs │ │ │ └── Action.cs │ │ ├── Objects │ │ │ ├── ELinq │ │ │ │ └── InitializerFacet.cs │ │ │ ├── ObjectStateValueRecord.cs │ │ │ ├── DataClasses │ │ │ │ ├── EdmComplexTypeAttribute.cs │ │ │ │ ├── EdmEnumTypeAttribute.cs │ │ │ │ ├── EdmEntityTypeAttribute.cs │ │ │ │ ├── RelationshipKind.cs │ │ │ │ └── EdmComplexPropertyAttribute.cs │ │ │ ├── IObjectView.cs │ │ │ ├── SaveOptions.cs │ │ │ ├── OriginalValueRecord.cs │ │ │ ├── CurrentValueRecord.cs │ │ │ └── IntBox.cs │ │ ├── Query │ │ │ ├── PlanCompiler │ │ │ │ ├── JoinKind.cs │ │ │ │ ├── TypeIdKind.cs │ │ │ │ └── TransformationRulesGroup.cs │ │ │ └── InternalTrees │ │ │ │ ├── OpDelegate.cs │ │ │ │ ├── ComputedVar.cs │ │ │ │ ├── SetOpVar.cs │ │ │ │ └── RowCount.cs │ │ └── Common │ │ │ ├── EntitySql │ │ │ ├── AST │ │ │ │ ├── ApplyKind.cs │ │ │ │ ├── SelectKind.cs │ │ │ │ ├── OrderKind.cs │ │ │ │ ├── DistinctKind.cs │ │ │ │ ├── FromClauseItemKind.cs │ │ │ │ ├── JoinKind.cs │ │ │ │ ├── Statement.cs │ │ │ │ └── LiteralKind.cs │ │ │ ├── GenerateParser.cmd │ │ │ ├── MetadataMemberClass.cs │ │ │ ├── ScopeEntryKind.cs │ │ │ ├── IGetAlternativeName.cs │ │ │ ├── ExpressionResolution.cs │ │ │ └── GroupKeyAggregateInfo.cs │ │ │ ├── internal │ │ │ └── materialization │ │ │ │ ├── shaperfactory.cs │ │ │ │ └── TranslatorArg.cs │ │ │ ├── Utils │ │ │ └── Boolean │ │ │ │ ├── ExprType.cs │ │ │ │ └── LiteralVertexPair.cs │ │ │ └── CommandTrees │ │ │ ├── DbCommandTreeKind.cs │ │ │ ├── Internal │ │ │ └── ExpressionList.cs │ │ │ └── DbGroupAggregate.cs │ ├── ModelConfiguration │ │ ├── Conventions │ │ │ ├── Edm │ │ │ │ ├── Db │ │ │ │ │ ├── IDbConvention.cs │ │ │ │ │ ├── Mapping │ │ │ │ │ │ └── IDbMappingConvention.cs │ │ │ │ │ └── IDbConvention`.cs │ │ │ │ ├── IEdmConvention.cs │ │ │ │ └── IEdmConvention`.cs │ │ │ ├── Configuration │ │ │ │ ├── IConfigurationConvention.cs │ │ │ │ └── IConfigurationConvention`.cs │ │ │ └── IConvention.cs │ │ └── Configuration │ │ │ └── Properties │ │ │ └── PropertyConfiguration.cs │ ├── TransactionalBehavior.cs │ ├── Edm │ │ └── Validation │ │ │ ├── EdmModelValidationRule.cs │ │ │ └── DataModelValidationRule.cs │ ├── Internal │ │ ├── EntityEntries │ │ │ ├── MemberEntryType.cs │ │ │ └── ObjectContextTypeCache.cs │ │ ├── IDbEnumerator.cs │ │ ├── ConfigFile │ │ │ └── MigrationSqlGeneratorElement.cs │ │ └── Linq │ │ │ └── IInternalSetAdapter.cs │ ├── Utilities │ │ ├── DbModelExtensions.cs │ │ ├── HashSetExtensions.cs │ │ └── DbProviderInfoExtensions.cs │ ├── Migrations │ │ ├── Utilities │ │ │ └── EmptyContext.cs │ │ └── Model │ │ │ └── NotSupportedOperation.cs │ └── DataAnnotations │ │ └── Schema │ │ └── NotMappedAttribute.cs ├── PowerTools │ ├── db.png │ ├── menu.png │ ├── Resources │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ └── Package.ico │ ├── License.rtf │ ├── GlobalSuppressions.cs │ ├── Extensions │ │ └── StringExtensions.cs │ ├── Utilities │ │ ├── FileExtensions.cs │ │ ├── Check.cs │ │ └── DebugCheck.cs │ ├── Guids.cs │ ├── PkgCmdID.cs │ └── Properties │ │ └── InternalsVisibleTo.cs ├── NuGet │ ├── EntityFramework │ │ ├── tools │ │ │ ├── EntityFramework.psd1 │ │ │ ├── init.ps1 │ │ │ └── install.ps1 │ │ └── Content │ │ │ ├── App.config.transform │ │ │ └── Web.config.transform │ └── EntityFramework.SqlServerCompact │ │ ├── Content │ │ ├── App.config.transform │ │ └── Web.config.transform │ │ └── tools │ │ └── install.ps1 ├── EntityFramework.SqlServer │ ├── Properties │ │ └── AssemblyVersion.cs │ ├── ServerType.cs │ ├── SqlGen │ │ └── BoolWrapper.cs │ └── Utilities │ │ ├── FuncExtensions.cs │ │ ├── PrimitiveTypeExtensions.cs │ │ └── MetdataItemExtensions.cs ├── EntityFramework.SqlServerCompact │ ├── Properties │ │ └── AssemblyVersion.cs │ └── packages.config ├── SharedAssemblyVersionInfo.cs ├── Strict.ruleset ├── Migrate │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── InternalsVisibleTo.cs │ └── CmdLine │ │ ├── ICommandEnvironment.cs │ │ └── CommandEnvironment.cs ├── EntityFramework.PowerShell │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Migrations │ │ └── ProjectTypeNotSupportedException.cs ├── EntityFramework.PowerShell.Utility │ └── Properties │ │ └── AssemblyInfo.cs └── SharedAssemblyInfo.cs ├── test ├── EntityFramework │ ├── FinalPublicKey.snk │ ├── FunctionalTests │ │ ├── ProductivityApi │ │ │ └── DbSetTests.cs │ │ ├── TestModels │ │ │ ├── LinqModels │ │ │ │ └── FeaturedProductForLinq.cs │ │ │ ├── ArubaModel │ │ │ │ ├── ArubaTestFailure.cs │ │ │ │ ├── ArubaBaseline.cs │ │ │ │ ├── ArubaTask.cs │ │ │ │ ├── ArubaTaskInfo.cs │ │ │ │ ├── ArubaMachineConfig.cs │ │ │ │ ├── ArubaConfig.cs │ │ │ │ ├── ArubaPerson.cs │ │ │ │ ├── ArubaOwner.cs │ │ │ │ ├── ArubaRun.cs │ │ │ │ ├── ArubaBug.cs │ │ │ │ └── ArubaFailure.cs │ │ │ ├── ExtraLazyLoading │ │ │ │ └── ihasisloaded.cs │ │ │ ├── GearsOfWarModel │ │ │ │ ├── HeavyWeapon.cs │ │ │ │ ├── MilitaryRank.cs │ │ │ │ ├── CogTag.cs │ │ │ │ ├── City.cs │ │ │ │ └── Weapon.cs │ │ │ ├── SimpleModel │ │ │ │ ├── EntityConnectionForSimpleModel.cs │ │ │ │ ├── LoginsContext.cs │ │ │ │ ├── LocalDbLoginsContext.cs │ │ │ │ ├── CeLoginsContext.cs │ │ │ │ └── DisabledInitializerContext.cs │ │ │ ├── StoreModel │ │ │ │ ├── ConcreteType1_3.cs │ │ │ │ └── AWBuildVersion.cs │ │ │ ├── InvalidTypeModel │ │ │ │ ├── Person.cs │ │ │ │ └── PersonContext.cs │ │ │ └── UnSpecifiedOrderingModel │ │ │ │ ├── NoOrderingContext.cs │ │ │ │ └── CompositeKeyEntityWithNoOrdering.cs │ │ ├── Migrations │ │ │ ├── TestModel │ │ │ │ ├── TestMigration.cs │ │ │ │ ├── CustomOperationExtensions.cs │ │ │ │ └── CommentOperation.cs │ │ │ └── TestHelpers │ │ │ │ └── DbProviders.cs │ │ ├── packages.config │ │ ├── WrappingProvider │ │ │ └── WrappingProviderInvariantName.cs │ │ ├── TestHelpers │ │ │ ├── ListExtensions.cs │ │ │ ├── StringExtensions.cs │ │ │ └── FullTrustAttribute.cs │ │ └── Objects │ │ │ └── TransactionsModel.csdl │ ├── FunctionalTests.Transitional │ │ ├── ! DON'T ADD TESTS HERE │ │ │ └── ReadMe.txt │ │ ├── TestModels │ │ │ ├── ConcurrencyModel │ │ │ │ ├── TestDriver.cs │ │ │ │ ├── TitleSponsor.cs │ │ │ │ ├── Gearbox.cs │ │ │ │ ├── SponsorDetails.cs │ │ │ │ ├── EngineSupplier.cs │ │ │ │ ├── Location.cs │ │ │ │ └── Chassis.cs │ │ │ ├── AdvancedPatternsModel │ │ │ │ ├── UnMappedOffice.cs │ │ │ │ ├── Employee.cs │ │ │ │ ├── SiteInfo.cs │ │ │ │ ├── PastEmployee.cs │ │ │ │ ├── UnMappedPersonBase.cs │ │ │ │ ├── UnMappedOfficeBase.cs │ │ │ │ ├── Whiteboard.cs │ │ │ │ ├── MailRoom.cs │ │ │ │ ├── CurrentEmployee.cs │ │ │ │ ├── BuildingDetail.cs │ │ │ │ ├── WorkOrder.cs │ │ │ │ └── Office.cs │ │ │ ├── SimpleModel │ │ │ │ ├── FeaturedProduct.cs │ │ │ │ ├── ProductBase.cs │ │ │ │ ├── Product.cs │ │ │ │ ├── Blog.cs │ │ │ │ ├── ExtraEntity.cs │ │ │ │ ├── Login.cs │ │ │ │ └── Category.cs │ │ │ ├── StoreModel │ │ │ │ ├── ColoredProduct.cs │ │ │ │ ├── ConcreteType1_2.cs │ │ │ │ ├── ConcreteType1_1_1.cs │ │ │ │ ├── AbstractType1_1.cs │ │ │ │ ├── DiscontinuedProduct.cs │ │ │ │ ├── StyledProduct.cs │ │ │ │ ├── AbstractType1.cs │ │ │ │ ├── RowDetails.cs │ │ │ │ ├── UnitMeasure.cs │ │ │ │ ├── CustomerDiscount.cs │ │ │ │ └── SalesReason.cs │ │ │ ├── TemplateModels │ │ │ │ ├── CsMonsterModel │ │ │ │ │ ├── ExternalTypes │ │ │ │ │ │ ├── PhoneTypeMm.cs │ │ │ │ │ │ ├── LicenseStateMm.cs │ │ │ │ │ │ ├── PhoneMm.cs │ │ │ │ │ │ └── AuditInfoMm.cs │ │ │ │ │ └── CsMonsterModel.cs │ │ │ │ ├── ProcessTemplates.bat │ │ │ │ ├── CsAdvancedPatterns │ │ │ │ │ ├── Partials │ │ │ │ │ │ ├── OfficeMf.cs │ │ │ │ │ │ ├── PastEmployeeMf.cs │ │ │ │ │ │ ├── CurrentEmployeeMf.cs │ │ │ │ │ │ ├── SiteInfoMf.cs │ │ │ │ │ │ ├── EmployeeMf.cs │ │ │ │ │ │ ├── AdvancedPatternsModelFirstContext.cs │ │ │ │ │ │ ├── BuildingMf.cs │ │ │ │ │ │ └── AddressMf.cs │ │ │ │ │ └── CsAdvancedPatterns.cs │ │ │ │ └── ProcessVbTemplate.bat │ │ │ ├── SimpleMigrationsModel │ │ │ │ ├── Blog.cs │ │ │ │ ├── MigrateInitializerContext.cs │ │ │ │ └── 201112202056573_AddUrlToBlog.cs │ │ │ └── AllTypeKeysModel │ │ │ │ ├── BoolKeyEntity.cs │ │ │ │ ├── ByteKeyEntity.cs │ │ │ │ ├── FloatKeyEntity.cs │ │ │ │ ├── ShortKeyEntity.cs │ │ │ │ ├── DecimalKeyEntity.cs │ │ │ │ ├── DoubleKeyEntity.cs │ │ │ │ ├── GuidKeyEntity.cs │ │ │ │ ├── DateTimeKeyEntity.cs │ │ │ │ ├── TimeSpanKeyEntity.cs │ │ │ │ ├── DateTimeOffsetKeyEntity.cs │ │ │ │ ├── LongKeyEntity.cs │ │ │ │ └── CompositeKeyEntity.cs │ │ ├── TestHelpers │ │ │ ├── TestGroup.cs │ │ │ └── DefaultUnitTestsConnectionFactory.cs │ │ ├── packages.config │ │ ├── Properties │ │ │ └── InternalsVisibleTo.cs │ │ └── Metadata │ │ │ ├── MetadataCachingModel.msl │ │ │ └── MetadataCachingModel.csdl │ ├── VBTests │ │ ├── packages.config │ │ ├── VbMonsterModel │ │ │ ├── ExternalTypes │ │ │ │ ├── PhoneTypeMm.vb │ │ │ │ ├── LicenseStateMm.vb │ │ │ │ ├── PhoneMm.vb │ │ │ │ └── AuditInfoMm.vb │ │ │ ├── VbMonsterModel.vb │ │ │ ├── BackOrderLine2Mm.vb │ │ │ ├── SupplierLogoMm.vb │ │ │ ├── BarcodeDetailMm.vb │ │ │ ├── CustomerInfoMm.vb │ │ │ ├── ConcurrencyInfoMm.vb │ │ │ ├── SuspiciousActivityMm.vb │ │ │ ├── DimensionsMm.vb │ │ │ ├── DriverMm.vb │ │ │ ├── BackOrderLineMm.vb │ │ │ ├── OrderNoteMm.vb │ │ │ ├── ProductPageViewMm.vb │ │ │ ├── RSATokenMm.vb │ │ │ ├── ProductDetailMm.vb │ │ │ ├── ResolutionMm.vb │ │ │ └── ComputerMm.vb │ │ └── VbAdvancedPatterns │ │ │ ├── Partials │ │ │ ├── OfficeMf.vb │ │ │ ├── PastEmployeeMf.vb │ │ │ ├── CurrentEmployeeMf.vb │ │ │ ├── EmployeeMf.vb │ │ │ ├── SiteInfoMf.vb │ │ │ ├── BuildingMf.vb │ │ │ ├── AdvancedPatternsModelFirstContext.vb │ │ │ └── AddressMf.vb │ │ │ └── VbAdvancedPatterns.vb │ ├── UnitTests │ │ ├── TestHelpers │ │ │ └── Fake │ │ │ │ ├── DerivedFakeWithProps.cs │ │ │ │ ├── FakeDerivedEntity.cs │ │ │ │ ├── FakeDerivedObjectContext.cs │ │ │ │ ├── FakeEntity.cs │ │ │ │ └── FakeSqlGenerator.cs │ │ ├── packages.config │ │ ├── Validation │ │ │ └── TestHelpers │ │ │ │ └── Model │ │ │ │ ├── AircraftInfo.cs │ │ │ │ └── EntityWithOptionalNestedComplexType.cs │ │ ├── CommandLine │ │ │ └── TestHelpers │ │ │ │ ├── PropWithNoCommandName.cs │ │ │ │ ├── TwoPropsWithSameSwitch.cs │ │ │ │ ├── BadPositionArgNoOne.cs │ │ │ │ └── InferredTestArgs.cs │ │ ├── Internal │ │ │ └── TestHelpers │ │ │ │ ├── PropertyEntryMetadataForMock.cs │ │ │ │ ├── NavigationEntryMetadataForMock.cs │ │ │ │ └── InternalEntityEntryForMock.cs │ │ ├── Utilities │ │ │ ├── ByteExtensionsTests.cs │ │ │ ├── DbModelExtensionsTests.cs │ │ │ └── AssemblyExtensionsTests.cs │ │ ├── Infrastructure │ │ │ └── ProviderInvariantNameTests.cs │ │ ├── Core │ │ │ └── Metadata │ │ │ │ └── Edm │ │ │ │ ├── MetadataCacheTests.msl │ │ │ │ ├── MetadataCacheTests.csdl │ │ │ │ ├── MetadataCacheTests.ssdl │ │ │ │ ├── EnumTypeTests.cs │ │ │ │ └── EdmSchemaErrorTests.cs │ │ ├── Properties │ │ │ └── InternalsVisibleTo.cs │ │ ├── Spatial │ │ │ ├── DbSpatialServicesTests.cs │ │ │ └── DefaultServicesTests.cs │ │ └── ModelConfiguration │ │ │ └── Edm │ │ │ └── EntitySetExtensionsTests.cs │ └── DropAllDatabases.sql └── PowerTools.Test │ ├── packages.config │ └── Extensions │ └── StringExtensionsTests.cs ├── samples └── Provider │ ├── ProviderTests │ ├── ProviderTests.snk │ ├── packages.config │ └── TestBase.cs │ ├── NorthwindEFModel │ ├── NorthwindEFModel.snk │ ├── Database │ │ └── CreateNorthwindEFDB.sql │ └── regenerate.cmd │ ├── SampleEntityFrameworkProvider │ ├── SampleEntityFrameworkProvider.snk │ └── Factory.cs │ ├── .nuget │ └── NuGet.Config │ ├── DdexProvider │ ├── DDEX provider sample for the ADO.NET Entity Designer.doc │ └── ExtendedProvider.csproj.user │ ├── EdmGenTests │ ├── test.cmd │ └── README.txt │ ├── FunctionStubGenerator │ └── App.config │ └── publish.cmd ├── Build.cmd ├── .nuget ├── NuGet.config └── packages.config ├── .gitignore ├── packages └── repositories.config └── tools └── EF.opencover.xunit /src/EcmaPublicKey.snk: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/EntityFramework/Properties/Resources.Migrate.tt: -------------------------------------------------------------------------------- 1 | <#@ include file="Resources.tt" #> -------------------------------------------------------------------------------- /src/EntityFramework/Properties/Resources.PowerShell.tt: -------------------------------------------------------------------------------- 1 | <#@ include file="Resources.tt" #> -------------------------------------------------------------------------------- /src/PowerTools/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/db.png -------------------------------------------------------------------------------- /src/PowerTools/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/menu.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/1.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/2.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/3.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/4.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/5.png -------------------------------------------------------------------------------- /src/PowerTools/Resources/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/PowerTools/Resources/Package.ico -------------------------------------------------------------------------------- /test/EntityFramework/FinalPublicKey.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/test/EntityFramework/FinalPublicKey.snk -------------------------------------------------------------------------------- /samples/Provider/ProviderTests/ProviderTests.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/samples/Provider/ProviderTests/ProviderTests.snk -------------------------------------------------------------------------------- /Build.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild "%~dp0\EF.msbuild" /v:minimal /maxcpucount /nodeReuse:false %* 4 | -------------------------------------------------------------------------------- /src/EntityFramework/Properties/AssemblyVersion.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/EntityFramework/Properties/AssemblyVersion.cs -------------------------------------------------------------------------------- /src/NuGet/EntityFramework/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/NuGet/EntityFramework/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /samples/Provider/NorthwindEFModel/NorthwindEFModel.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/samples/Provider/NorthwindEFModel/NorthwindEFModel.snk -------------------------------------------------------------------------------- /samples/Provider/ProviderTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/Properties/AssemblyVersion.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/EntityFramework.SqlServer/Properties/AssemblyVersion.cs -------------------------------------------------------------------------------- /samples/Provider/NorthwindEFModel/Database/CreateNorthwindEFDB.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/samples/Provider/NorthwindEFModel/Database/CreateNorthwindEFDB.sql -------------------------------------------------------------------------------- /src/EntityFramework.SqlServerCompact/Properties/AssemblyVersion.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/src/EntityFramework.SqlServerCompact/Properties/AssemblyVersion.cs -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/ProductivityApi/DbSetTests.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/test/EntityFramework/FunctionalTests/ProductivityApi/DbSetTests.cs -------------------------------------------------------------------------------- /.nuget/NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/Provider/SampleEntityFrameworkProvider/SampleEntityFrameworkProvider.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/samples/Provider/SampleEntityFrameworkProvider/SampleEntityFrameworkProvider.snk -------------------------------------------------------------------------------- /samples/Provider/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/PowerTools/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}} 2 | {\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22\par 3 | } 4 | -------------------------------------------------------------------------------- /samples/Provider/DdexProvider/DDEX provider sample for the ADO.NET Entity Designer.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/entityframework/HEAD/samples/Provider/DdexProvider/DDEX provider sample for the ADO.NET Entity Designer.doc -------------------------------------------------------------------------------- /src/EntityFramework.SqlServerCompact/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/PowerTools.Test/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/Provider/NorthwindEFModel/regenerate.cmd: -------------------------------------------------------------------------------- 1 | %WINDIR%\Microsoft.NET\Framework\v4.0.30319\EdmGen.exe /mode:EntityClassGeneration /incsdl:NorthwindEFModel.csdl /targetVersion:4.5 /outobjectlayer:NorthwindEFModel.Designer.cs 2 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/! DON'T ADD TESTS HERE/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This project is being used to quarantine files that depend on EntityFramework's InternalsVisibleTo attribute. 2 | New tests should be added to the FunctionalTests project. 3 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework/Content/App.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework/Content/Web.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework/tools/init.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) 4 | { 5 | Remove-Module EntityFramework 6 | } 7 | 8 | Import-Module (Join-Path $toolsPath EntityFramework.psd1) 9 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework.SqlServerCompact/Content/App.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework.SqlServerCompact/Content/Web.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/PowerTools/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")] 3 | -------------------------------------------------------------------------------- /.nuget/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/TestDriver.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | public class TestDriver : Driver 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/TestHelpers/Fake/DerivedFakeWithProps.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | internal class DerivedFakeWithProps : FakeWithProps 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/LinqModels/FeaturedProductForLinq.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | public class FeaturedProductForLinq : ProductForLinq 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/ServerType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.SqlServer 4 | { 5 | internal enum ServerType 6 | { 7 | OnPremises, 8 | Cloud, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/UnMappedOffice.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class UnMappedOffice : Office 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaTestFailure.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | public class ArubaTestFailure : ArubaBaseline 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/SharedAssemblyVersionInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyVersion("6.0.0.0")] 6 | [assembly: AssemblyFileVersion("6.0.0.0")] 7 | [assembly: AssemblyInformationalVersion("6.0.0-beta1")] 8 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ExtraLazyLoading/ihasisloaded.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace LazyUnicorns 4 | { 5 | public interface IHasIsLoaded 6 | { 7 | bool IsLoaded { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ExternalTypes/PhoneTypeMm.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace Another.Place 3 | Public Enum PhoneTypeMm 4 | Cell = 1 5 | Land = 2 6 | Satellite = 3 7 | End Enum 8 | End Namespace 9 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IDbModelCacheKeyProvider.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | public interface IDbModelCacheKeyProvider 6 | { 7 | string CacheKey { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ExternalTypes/LicenseStateMm.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace Another.Place 3 | Public Enum LicenseStateMm 4 | Active = 1 5 | Suspended = 2 6 | Revoked = 3 7 | End Enum 8 | End Namespace 9 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | Initialize-EFConfiguration $project 4 | Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' 5 | 6 | Write-Host 7 | Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands." 8 | -------------------------------------------------------------------------------- /samples/Provider/EdmGenTests/test.cmd: -------------------------------------------------------------------------------- 1 | copy /b %WINDIR%\Microsoft.NET\Framework\v4.0.30319\EdmGen.exe . 2 | copy /b ..\SampleEntityFrameworkProvider\bin\Debug\SampleEntityFrameworkProvider.dll . 3 | .\edmgen.exe /provider:SampleEntityFrameworkProvider /mode:fullgeneration /connectionstring:"server=.\sqlexpress;database=NorthwindEF5;integrated security=sspi" /project:NorthwindEF /targetVersion:4.5 4 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IDbModelCacheKeyFactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | public interface IDbModelCacheKeyFactory 6 | { 7 | IDbModelCacheKey Create(DbContext context); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IDbModelCacheKey.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | public interface IDbModelCacheKey 6 | { 7 | bool Equals(object other); 8 | int GetHashCode(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/FeaturedProduct.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | public class FeaturedProduct : Product 6 | { 7 | public string PromotionalCode { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaBaseline.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | public class ArubaBaseline : ArubaFailure 6 | { 7 | public string Comment { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/GearsOfWarModel/HeavyWeapon.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.GearsOfWarModel 4 | { 5 | public class HeavyWeapon : Weapon 6 | { 7 | public bool Overheats { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/Structures/ViewTarget.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration.Structures 4 | { 5 | internal enum ViewTarget 6 | { 7 | QueryView, 8 | UpdateView 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/TitleSponsor.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | public class TitleSponsor : Sponsor 6 | { 7 | public SponsorDetails Details { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/SimpleModel/EntityConnectionForSimpleModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class EntityConnectionForSimpleModel : DbContext 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/QueryRewriting/ITileQuery.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting 4 | { 5 | internal interface ITileQuery 6 | { 7 | string Description { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Strict.ruleset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestHelpers/TestGroup.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | public enum TestGroup 6 | { 7 | Default, 8 | MigrationsTests 9 | //Add more as necessary 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/StoreModel/ConcreteType1_3.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public class ConcreteType1_3 : AbstractType1 6 | { 7 | public virtual string Property1_3_1 { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/ProductBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | public class ProductBase 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/ColoredProduct.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public class ColoredProduct : StyledProduct 6 | { 7 | public virtual string Color { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/InvalidTypeModel/Person.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace InvalidTypeModel 4 | { 5 | public class Person 6 | { 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/TestHelpers/Fake/FakeDerivedEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Internal.UnitTests 4 | { 5 | public class FakeDerivedEntity : FakeEntity 6 | { 7 | public string Foo { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/Employee.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public abstract class Employee : UnMappedPersonBase 6 | { 7 | public int EmployeeId { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/ConcreteType1_2.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public class ConcreteType1_2 : AbstractType1 6 | { 7 | public virtual string Property4 { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/Migrations/TestModel/TestMigration.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations 4 | { 5 | public class TestMigration : DbMigration 6 | { 7 | public override void Up() 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Validation/TestHelpers/Model/AircraftInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Validation 4 | { 5 | public class AircraftInfo 6 | { 7 | public string Code { get; set; } 8 | public string Name { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Migrate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyDefaultAlias("migrate.exe")] 6 | [assembly: AssemblyDescription("migrate.exe")] 7 | [assembly: AssemblyProduct("Microsoft® ADO.NET Entity Framework")] 8 | [assembly: AssemblyTitle("migrate")] 9 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/ConcreteType1_1_1.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public class ConcreteType1_1_1 : AbstractType1_1 6 | { 7 | public virtual string Property5 { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/SimpleModel/LoginsContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class LoginsContext : DbContext 8 | { 9 | public DbSet Logins { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/ViewGenMode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration 4 | { 5 | internal enum ViewGenMode 6 | { 7 | GenerateAllViews = 0, 8 | OfTypeViews, 9 | OfTypeOnlyViews 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/INamedDataModelItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | internal interface INamedDataModelItem : IMetadataItem 6 | { 7 | string Name { get; } 8 | string Identity { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Migrate/CmdLine/ICommandEnvironment.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine 4 | { 5 | public interface ICommandEnvironment 6 | { 7 | string CommandLine { get; } 8 | 9 | string[] GetCommandLineArgs(); 10 | 11 | string Program { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/AbstractType1_1.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public abstract class AbstractType1_1 : AbstractType1 6 | { 7 | public virtual string Property4 { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/SchemaObjectModel/AddErrorKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.SchemaObjectModel 4 | { 5 | internal enum AddErrorKind 6 | { 7 | Succeeded, 8 | 9 | MissingNameError, 10 | 11 | DuplicateNameError, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsMonsterModel/ExternalTypes/PhoneTypeMm.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Another.Place 4 | { 5 | public enum PhoneTypeMm 6 | { 7 | Cell = 1, 8 | Land = 2, 9 | Satellite = 3, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/ViewGenTraceLevel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration 4 | { 5 | internal enum ViewGenTraceLevel 6 | { 7 | None = 0, 8 | ViewsOnly, 9 | Normal, 10 | Verbose 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/NuGet/EntityFramework.SqlServerCompact/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | Add-EFDefaultConnectionFactory $project 'System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework' -ConstructorArguments 'System.Data.SqlServerCe.4.0' 4 | Add-EFProvider $project 'System.Data.SqlServerCe.4.0' 'System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact' 5 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/SiteInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class SiteInfo 6 | { 7 | public int? Zone { get; set; } 8 | public string Environment { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/Product.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | public class Product : ProductBase 6 | { 7 | public string CategoryId { get; set; } 8 | public Category Category { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/InvalidTypeModel/PersonContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace InvalidTypeModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class PersonContext : DbContext 8 | { 9 | public DbSet People { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/SimpleModel/LocalDbLoginsContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class LocalDbLoginsContext : DbContext 8 | { 9 | public DbSet Logins { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsMonsterModel/ExternalTypes/LicenseStateMm.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Another.Place 4 | { 5 | public enum LicenseStateMm 6 | { 7 | Active = 1, 8 | Suspended = 2, 9 | Revoked = 3 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/PropertyKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | /// 6 | /// Kind of Item Attribute 7 | /// 8 | public enum PropertyKind 9 | { 10 | System, 11 | Extended 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/PastEmployee.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | using System; 6 | 7 | public class PastEmployee : Employee 8 | { 9 | public DateTime TerminationDate { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/ELinq/InitializerFacet.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.ELinq 4 | { 5 | internal enum InitializerMetadataKind 6 | { 7 | Grouping, 8 | ProjectionNew, 9 | ProjectionInitializer, 10 | EntityCollection, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/DiscontinuedProduct.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System; 6 | 7 | public class DiscontinuedProduct : Product 8 | { 9 | public virtual DateTime DiscontinuedDate { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/OfficeMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace AdvancedPatternsVB 3 | 4 | Partial Public Class OfficeMf 5 | 6 | Public Function GetBuilding() As BuildingMf 7 | Return Building 8 | End Function 9 | 10 | End Class 11 | 12 | End Namespace 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _ReSharper* 2 | bin 3 | Bin 4 | obj 5 | App_Data 6 | TestResults 7 | *.user 8 | *.patch 9 | *.sln.cache 10 | *.orig 11 | *.suo 12 | *.log 13 | *.exe 14 | *.dll 15 | *.resources 16 | packages 17 | EntityFramework.xml 18 | EntityFramework.SqlServer.xml 19 | EntityFramework.SqlServerCompact.xml 20 | *.BASE.* 21 | *.REMOTE.* 22 | *.LOCAL.* 23 | StyleCop.Cache 24 | *.csproj.DotSettings 25 | /coverage 26 | /OpenCoverResults.xml 27 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/UnMappedPersonBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class UnMappedPersonBase 6 | { 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/PlanCompiler/JoinKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.PlanCompiler 4 | { 5 | /// 6 | /// The only join kinds we care about 7 | /// 8 | internal enum JoinKind 9 | { 10 | Inner, 11 | LeftOuter 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/UnMappedOfficeBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public abstract class UnMappedOfficeBase 6 | { 7 | public string Number { get; set; } 8 | public string Description { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/ApplyKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents apply kind (cross,outer). 7 | /// 8 | internal enum ApplyKind 9 | { 10 | Cross, 11 | Outer 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/SelectKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents select kind (value,row). 7 | /// 8 | internal enum SelectKind 9 | { 10 | Value, 11 | Row 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Edm/Db/IDbConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | public interface IDbConvention : IConvention 8 | { 9 | void Apply(EdmModel model); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Edm/IEdmConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | public interface IEdmConvention : IConvention 8 | { 9 | void Apply(EdmModel model); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/Migrations/TestHelpers/DbProviders.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations 4 | { 5 | public static class DbProviders 6 | { 7 | public const string Sql = "System.Data.SqlClient"; 8 | public const string SqlCe = "System.Data.SqlServerCe.4.0"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/QueryRewriting/TileOpKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration.QueryRewriting 4 | { 5 | internal enum TileOpKind 6 | { 7 | Union, 8 | Join, 9 | AntiSemiJoin, 10 | // Project, 11 | Named 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/PlanCompiler/TypeIdKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.PlanCompiler 4 | { 5 | /// 6 | /// The kind of type-id in use 7 | /// 8 | internal enum TypeIdKind 9 | { 10 | UserSpecified = 0, 11 | Generated 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/TransactionalBehavior.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | /// 6 | /// Controls the transaction creation behavior 7 | /// 8 | public enum TransactionalBehavior 9 | { 10 | EnsureTransaction, 11 | DoNotEnsureTransaction 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleMigrationsModel/Blog.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.SimpleMigrationsModel 4 | { 5 | public class Blog 6 | { 7 | public int BlogId { get; set; } 8 | public string Name { get; set; } 9 | public string Url { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Validation/TestHelpers/Model/EntityWithOptionalNestedComplexType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Validation 4 | { 5 | public class EntityWithOptionalNestedComplexType 6 | { 7 | public int ID { get; set; } 8 | 9 | public AirportDetails AirportDetails { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/internal/materialization/shaperfactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.Internal.Materialization 4 | { 5 | /// 6 | /// An immutable type used to generate Shaper instances. 7 | /// 8 | internal abstract class ShaperFactory 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/ObjectStateValueRecord.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | internal enum ObjectStateValueRecord 6 | { 7 | OriginalReadonly = 0, 8 | CurrentUpdatable = 1, 9 | OriginalUpdatableInternal = 2, 10 | OriginalUpdatablePublic = 3, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/Whiteboard.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class Whiteboard 6 | { 7 | public byte[] iD { get; set; } 8 | public string AssetTag { get; set; } 9 | public Office Office { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/CommandLine/TestHelpers/PropWithNoCommandName.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine.Tests 4 | { 5 | extern alias migrate; 6 | 7 | public class PropWithNoCommandName 8 | { 9 | [migrate::CmdLine.CommandLineParameterAttribute(Default = true)] 10 | public bool b1 { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/OrderKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents order kind (none=asc,asc,desc). 7 | /// 8 | internal enum OrderKind 9 | { 10 | None, 11 | Asc, 12 | Desc 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/WrappingProvider/WrappingProviderInvariantName.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.WrappingProvider 4 | { 5 | using System.Data.Entity.Infrastructure; 6 | 7 | public class WrappingProviderInvariantName : IProviderInvariantName 8 | { 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework.PowerShell/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyDefaultAlias("EntityFramework.Powershell.dll")] 6 | [assembly: AssemblyDescription("EntityFramework.PowerShell.dll")] 7 | [assembly: AssemblyProduct("Microsoft® ADO.NET Entity Framework")] 8 | [assembly: AssemblyTitle("EntityFramework.PowerShell")] 9 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleMigrationsModel/MigrateInitializerContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.SimpleMigrationsModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class MigrateInitializerContext : DbContext 8 | { 9 | public DbSet Blogs { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/StyledProduct.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class StyledProduct : Product 8 | { 9 | [StringLength(150)] 10 | public virtual string Style { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/UnSpecifiedOrderingModel/NoOrderingContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace UnSpecifiedOrderingModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class NoOrderingContext : DbContext 8 | { 9 | public DbSet CompositeKeyEntities { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ExternalTypes/PhoneMm.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Imports System 3 | 4 | Namespace Another.Place 5 | Partial Public Class PhoneMm 6 | Public Property PhoneNumber As String 7 | Public Property Extension As String = "None" 8 | Public Property PhoneType As PhoneTypeMm 9 | End Class 10 | End Namespace 11 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/IMetadataItem.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | using System.Diagnostics.CodeAnalysis; 6 | 7 | [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 8 | public interface IMetadataItem 9 | { 10 | // TODO: METADATA: Marker interface. 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/DistinctKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents distinct kind (none=all,all,distinct). 7 | /// 8 | internal enum DistinctKind 9 | { 10 | None, 11 | All, 12 | Distinct 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/ICancelableDbCommandInterceptor.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using System.Data.Common; 6 | 7 | internal interface ICancelableDbCommandInterceptor : IDbInterceptor 8 | { 9 | bool CommandExecuting(DbCommand command, DbInterceptionContext interceptionContext); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Edm/Db/Mapping/IDbMappingConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | public interface IDbMappingConvention : IConvention 8 | { 9 | void Apply(DbDatabaseMapping databaseMapping); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/MailRoom.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | using System; 6 | 7 | public class MailRoom 8 | { 9 | public int id { get; set; } 10 | public Building Building { get; set; } 11 | public Guid BuildingId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/ProcessTemplates.bat: -------------------------------------------------------------------------------- 1 | call ProcessCsTemplate CsMonsterModel ..\Schemas\MonsterModel.csdl 2 | call ProcessCsTemplate CsAdvancedPatterns ..\Schemas\AdvancedPatterns.edmx 3 | call ProcessVbTemplate VbMonsterModel ..\..\ProductivityFunctionalTests\ProductivityApi\TemplateModels\Schemas\MonsterModel.csdl 4 | call ProcessVbTemplate VbAdvancedPatterns ..\..\ProductivityFunctionalTests\ProductivityApi\TemplateModels\Schemas\AdvancedPatterns.edmx 5 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaTask.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | public class ArubaTask 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public bool Deleted { get; set; } 10 | public ArubaTaskInfo TaskInfo { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/PastEmployeeMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | Namespace AdvancedPatternsVB 4 | Partial Public Class PastEmployeeMf 5 | Public Sub New() 6 | End Sub 7 | 8 | Public Sub New(firstName As String, lastName As String) 9 | MyBase.New(firstName, lastName) 10 | End Sub 11 | End Class 12 | End Namespace -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/DataClasses/EdmComplexTypeAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.DataClasses 4 | { 5 | /// 6 | /// attribute for complex types 7 | /// 8 | [AttributeUsage(AttributeTargets.Class)] 9 | public sealed class EdmComplexTypeAttribute : EdmTypeAttribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/DataClasses/EdmEnumTypeAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.DataClasses 4 | { 5 | /// 6 | /// Attribute indicating an enum type. 7 | /// 8 | [AttributeUsage(AttributeTargets.Enum)] 9 | public sealed class EdmEnumTypeAttribute : EdmTypeAttribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/IObjectView.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | using System.ComponentModel; 6 | 7 | internal interface IObjectView 8 | { 9 | void EntityPropertyChanged(object sender, PropertyChangedEventArgs e); 10 | void CollectionChanged(object sender, CollectionChangeEventArgs e); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/BoolKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class BoolKeyEntity 8 | { 9 | [Key] 10 | public bool key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/ByteKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class ByteKeyEntity 8 | { 9 | [Key] 10 | public byte key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/Gearbox.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | public class Gearbox 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | // Removed nav-prop to collection of Teams 11 | // Removed nav-prop to Engine 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/OfficeMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | public partial class OfficeMf 6 | { 7 | public BuildingMf GetBuilding() 8 | { 9 | return Building; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/GearsOfWarModel/MilitaryRank.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.GearsOfWarModel 4 | { 5 | public enum MilitaryRank 6 | { 7 | Private, 8 | Corporal, 9 | Sergeant, 10 | Lieutenant, 11 | Captain, 12 | Major, 13 | Colonel, 14 | General, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/FromClauseItemKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// From clause item kind. 7 | /// 8 | internal enum FromClauseItemKind 9 | { 10 | AliasedFromClause, 11 | JoinFromClause, 12 | ApplyFromClause 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/CurrentEmployee.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class CurrentEmployee : Employee 6 | { 7 | public CurrentEmployee Manager { get; set; } 8 | public decimal LeaveBalance { get; set; } 9 | public Office Office { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/FloatKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class FloatKeyEntity 8 | { 9 | [Key] 10 | public float key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/ShortKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class ShortKeyEntity 8 | { 9 | [Key] 10 | public short key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/SponsorDetails.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | 7 | [ComplexType] 8 | public class SponsorDetails 9 | { 10 | public int Days { get; set; } 11 | public decimal Space { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/GearsOfWarModel/CogTag.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.GearsOfWarModel 4 | { 5 | 6 | public class CogTag 7 | { 8 | // auto-generated non-integer key 9 | public Guid Id { get; set; } 10 | public string Note { get; set; } 11 | 12 | public virtual Gear Gear { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework.PowerShell.Utility/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Reflection; 4 | 5 | [assembly: AssemblyDefaultAlias("EntityFramework.Powershell.Utility.dll")] 6 | [assembly: AssemblyDescription("EntityFramework.PowerShell.Utility.dll")] 7 | [assembly: AssemblyProduct("Microsoft® ADO.NET Entity Framework")] 8 | [assembly: AssemblyTitle("EntityFramework.PowerShell.Utility")] 9 | -------------------------------------------------------------------------------- /src/PowerTools/Extensions/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | namespace Microsoft.DbContextPackage.Extensions 3 | { 4 | using System; 5 | 6 | internal static class StringExtensions 7 | { 8 | public static bool EqualsIgnoreCase(this string s1, string s2) 9 | { 10 | return string.Equals(s1, s2, StringComparison.OrdinalIgnoreCase); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/BuildingDetail.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | using System; 6 | 7 | public class BuildingDetail 8 | { 9 | public Guid BuildingId { get; set; } 10 | public Building Building { get; set; } 11 | public string Details { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/DecimalKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class DecimalKeyEntity 8 | { 9 | [Key] 10 | public decimal key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/DoubleKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class DoubleKeyEntity 8 | { 9 | [Key] 10 | public double key { get; set; } 11 | 12 | public string Description { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaTaskInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | public class ArubaTaskInfo 6 | { 7 | public long Passed { get; set; } 8 | public long Failed { get; set; } 9 | public long Investigates { get; set; } 10 | public long Improvements { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/CurrentEmployeeMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace AdvancedPatternsVB 3 | 4 | Partial Public Class CurrentEmployeeMf 5 | Public Sub New() 6 | End Sub 7 | 8 | Public Sub New(firstName As String, lastName As String) 9 | MyBase.New(firstName, lastName) 10 | End Sub 11 | End Class 12 | 13 | End Namespace 14 | -------------------------------------------------------------------------------- /samples/Provider/FunctionStubGenerator/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/EntityFramework/Edm/Validation/EdmModelValidationRule.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Edm.Validation 4 | { 5 | internal class EdmModelValidationRule : DataModelValidationRule 6 | { 7 | internal EdmModelValidationRule(Action validate) 8 | : base(validate) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IEntityConnectionInterceptor.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using System.Data.Entity.Core.EntityClient; 6 | 7 | internal interface IEntityConnectionInterceptor : IDbInterceptor 8 | { 9 | bool ConnectionOpening(EntityConnection connection, DbInterceptionContext interceptionContext); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Configuration/IConfigurationConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.ModelConfiguration.Configuration; 6 | 7 | public interface IConfigurationConvention : IConvention 8 | { 9 | void Apply(ModelConfiguration modelConfiguration); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/Blog.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class Blog 8 | { 9 | [Key] 10 | public int Id { get; set; } 11 | 12 | public string Title { get; set; } 13 | public string Content { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/AbstractType1.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | public abstract class AbstractType1 6 | { 7 | public virtual int Property1_ID { get; set; } 8 | 9 | public virtual string Property2 { get; set; } 10 | 11 | public virtual string Property3 { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/WorkOrder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | public class WorkOrder 6 | { 7 | public int WorkOrderId { get; set; } 8 | public int EmployeeId { get; set; } 9 | public Employee Employee { get; set; } 10 | public string Details { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/ExtraEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | /// 6 | /// Stand-alone entity type that is not part of any other models 7 | /// 8 | public class ExtraEntity 9 | { 10 | public int Id { get; set; } 11 | public string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ExternalTypes/AuditInfoMm.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Imports System 3 | 4 | Namespace Another.Place 5 | Partial Public Class AuditInfoMm 6 | Public Property ModifiedDate As Date 7 | Public Property ModifiedBy As String 8 | 9 | Public Property Concurrency As ConcurrencyInfoMm = New ConcurrencyInfoMm 10 | 11 | End Class 12 | End Namespace 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/GenerateParser.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SETLOCAL 3 | SET TOOLSPATH=%SDXROOT%\ndp\fx\src\DataEntity\tools\bin\x86 4 | del y 5 | ECHO. 6 | ECHO Generating Scanner... 7 | ECHO ~~~~~~~~~~~~~~~~~~~~~ 8 | %TOOLSPATH%\lex.exe CqlLexer.l CqlLexer.cs 9 | ECHO. 10 | ECHO. 11 | ECHO Generating Grammar... 12 | ECHO ~~~~~~~~~~~~~~~~~~~~~ 13 | %TOOLSPATH%\yacc.exe -v -fCqlParser -m"internal partial" -nSystem.Data.Common.EntitySql -c# CqlGrammar.y 14 | POPD 15 | ENDLOCAL 16 | ECHO. 17 | ECHO DONE! 18 | ECHO. -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/GuidKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System; 6 | using System.ComponentModel.DataAnnotations; 7 | 8 | public class GuidKeyEntity 9 | { 10 | [Key] 11 | public Guid key { get; set; } 12 | 13 | public string Description { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/SimpleModel/CeLoginsContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class CeLoginsContext : LoginsContext 8 | { 9 | public CeLoginsContext() 10 | { 11 | Database.SetInitializer(new DropCreateDatabaseIfModelChanges()); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/Utils/Boolean/ExprType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.Utils.Boolean 4 | { 5 | /// 6 | /// Enumeration of Boolean expression node types. 7 | /// 8 | internal enum ExprType 9 | { 10 | And, 11 | Not, 12 | Or, 13 | Term, 14 | True, 15 | False, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Configuration/Properties/PropertyConfiguration.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Configuration.Properties 4 | { 5 | /// 6 | /// Base class for configuring a property on an entity type or complex type. 7 | /// 8 | public abstract class PropertyConfiguration : ConfigurationBase 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/RowDetails.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | 8 | [ComplexType] 9 | public class RowDetails 10 | { 11 | public Guid rowguid { get; set; } 12 | public DateTime ModifiedDate { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/UnitMeasure.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class UnitMeasure 8 | { 9 | public virtual string UnitMeasureCode { get; set; } 10 | 11 | [MaxLength(42)] 12 | public virtual string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/TestHelpers/Fake/FakeDerivedObjectContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Internal.UnitTests 4 | { 5 | using System.Data.Entity.Core.Objects; 6 | 7 | public class FakeDerivedObjectContext : ObjectContext 8 | { 9 | public FakeDerivedObjectContext() 10 | : base("") 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/Provider/EdmGenTests/README.txt: -------------------------------------------------------------------------------- 1 | This test uses SampleEntityFrameworkProvider to reverse-engineer a NorthwindEF5 database. 2 | We make a copy of EdmGen.exe to be able to register new provider and run EdmGen.exe /mode:fullgeneration. 3 | 4 | NOTES: 5 | 6 | 1. You must build the provider before running the sample. 7 | 2. Note that generated SSDL has a reference to the provider invariant name used as an argument to EdmGen.exe: 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/DataClasses/EdmEntityTypeAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.DataClasses 4 | { 5 | /// 6 | /// Attribute identifying the Edm base class 7 | /// 8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] 9 | public sealed class EdmEntityTypeAttribute : EdmTypeAttribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/SaveOptions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | /// 6 | /// Flags used to modify behavior of ObjectContext.SaveChanges() 7 | /// 8 | [Flags] 9 | public enum SaveOptions 10 | { 11 | None = 0, 12 | AcceptAllChangesAfterSave = 1, 13 | DetectChangesBeforeSave = 2 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/PlanCompiler/TransformationRulesGroup.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.PlanCompiler 4 | { 5 | /// 6 | /// Available groups of rules, not necessarily mutually exclusive 7 | /// 8 | internal enum TransformationRulesGroup 9 | { 10 | All, 11 | Project, 12 | PostJoinElimination 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaMachineConfig.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Data.Entity.Spatial; 6 | 7 | public class ArubaMachineConfig : ArubaConfig 8 | { 9 | public string Host { get; set; } 10 | public Guid Address { get; set; } 11 | public DbGeography Location { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/DateTimeKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System; 6 | using System.ComponentModel.DataAnnotations; 7 | 8 | public class DateTimeKeyEntity 9 | { 10 | [Key] 11 | public DateTime key { get; set; } 12 | 13 | public string Description { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/TimeSpanKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System; 6 | using System.ComponentModel.DataAnnotations; 7 | 8 | public class TimeSpanKeyEntity 9 | { 10 | [Key] 11 | public TimeSpan key { get; set; } 12 | 13 | public string Description { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/EngineSupplier.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class EngineSupplier 8 | { 9 | public int Id { get; set; } 10 | 11 | public string Name { get; set; } 12 | 13 | public virtual ICollection Engines { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestHelpers/ListExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | using System.Collections.Generic; 6 | 7 | public static class ListExtensions 8 | { 9 | public static T AddAndReturn(this List list, T elementToAdd) 10 | { 11 | list.Add(elementToAdd); 12 | return elementToAdd; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Internal/TestHelpers/PropertyEntryMetadataForMock.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | internal class PropertyEntryMetadataForMock : PropertyEntryMetadata 6 | { 7 | public PropertyEntryMetadataForMock() 8 | : base(typeof(object), typeof(object), "fake Name, mock Name property", true, true) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/JoinKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents join kind (cross,inner,leftouter,rightouter). 7 | /// 8 | internal enum JoinKind 9 | { 10 | Cross, 11 | Inner, 12 | LeftOuter, 13 | FullOuter, 14 | RightOuter 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/SchemaObjectModel/Operation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.SchemaObjectModel 4 | { 5 | /// 6 | /// The possible operations for an On<Operation> element 7 | /// 8 | internal enum Operation 9 | { 10 | /// 11 | /// the delete operation 12 | /// 13 | Delete, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Edm/Validation/DataModelValidationRule.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Edm.Validation 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | internal abstract class DataModelValidationRule 8 | { 9 | internal abstract Type ValidatedType { get; } 10 | internal abstract void Evaluate(EdmModelValidationContext context, IMetadataItem item); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Edm/Db/IDbConvention`.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | public interface IDbConvention : IConvention 8 | where TMetadataItem : MetadataItem 9 | { 10 | void Apply(TMetadataItem dbDataModelItem, EdmModel model); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/Location.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class Location 8 | { 9 | [ConcurrencyCheck] 10 | public double Latitude { get; set; } 11 | 12 | [ConcurrencyCheck] 13 | public double Longitude { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestHelpers/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestHelpers 4 | { 5 | using System.Text.RegularExpressions; 6 | 7 | public static class StringExtensions 8 | { 9 | public static string StripFormatting(this string argument) 10 | { 11 | return Regex.Replace(argument, @"\s", string.Empty); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Internal/TestHelpers/NavigationEntryMetadataForMock.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | internal class NavigationEntryMetadataForMock : NavigationEntryMetadata 6 | { 7 | public NavigationEntryMetadataForMock() 8 | : base(typeof(object), typeof(object), "fake Name, mock Name property", true) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Internal/EntityEntries/MemberEntryType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | /// 6 | /// The types of member entries supported. 7 | /// 8 | internal enum MemberEntryType 9 | { 10 | ReferenceNavigationProperty, 11 | CollectionNavigationProperty, 12 | ScalarProperty, 13 | ComplexProperty, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Internal/IDbEnumerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | using System.Collections.Generic; 6 | using System.Data.Entity.Infrastructure; 7 | 8 | internal interface IDbEnumerator : IEnumerator 9 | #if !NET40 10 | , IDbAsyncEnumerator 11 | #endif 12 | { 13 | new T Current { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/PowerTools/Utilities/FileExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | namespace Microsoft.DbContextPackage.Utilities 3 | { 4 | internal static class FileExtensions 5 | { 6 | public const string CSharp = ".cs"; 7 | public const string VisualBasic = ".vb"; 8 | public const string EntityDataModel = ".edmx"; 9 | public const string Xml = ".xml"; 10 | public const string Sql = ".sql"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsMonsterModel/CsMonsterModel.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/CommandTrees/DbCommandTreeKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.CommandTrees 4 | { 5 | /// 6 | /// Describes the different "kinds" (classes) of command trees. 7 | /// 8 | public enum DbCommandTreeKind 9 | { 10 | Query, 11 | Update, 12 | Insert, 13 | Delete, 14 | Function, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Edm/IEdmConvention`.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | public interface IEdmConvention : IConvention 8 | where TEdmDataModelItem : MetadataItem 9 | { 10 | void Apply(TEdmDataModelItem edmDataModelItem, EdmModel model); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/DateTimeOffsetKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System; 6 | using System.ComponentModel.DataAnnotations; 7 | 8 | public class DateTimeOffSetKeyEntity 9 | { 10 | [Key] 11 | public DateTimeOffset key { get; set; } 12 | 13 | public string Description { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/CsAdvancedPatterns.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/EmployeeMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace AdvancedPatternsVB 3 | 4 | Partial Public MustInherit Class EmployeeMf 5 | Protected Sub New() 6 | End Sub 7 | 8 | Protected Sub New(firstName__1 As String, lastName__2 As String) 9 | FirstName = firstName__1 10 | LastName = lastName__2 11 | End Sub 12 | End Class 13 | 14 | End Namespace 15 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/VbMonsterModel.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/SqlGen/BoolWrapper.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.SqlServer.SqlGen 4 | { 5 | /// 6 | /// Used for wrapping a boolean value as an object. 7 | /// 8 | internal class BoolWrapper 9 | { 10 | internal bool Value { get; set; } 11 | 12 | internal BoolWrapper() 13 | { 14 | Value = false; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/MetadataMemberClass.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql 4 | { 5 | /// 6 | /// Represents eSQL metadata member expression class. 7 | /// 8 | internal enum MetadataMemberClass 9 | { 10 | Type, 11 | FunctionGroup, 12 | InlineFunctionGroup, 13 | Namespace, 14 | EnumMember 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/DataClasses/RelationshipKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.DataClasses 4 | { 5 | /// 6 | /// Identifies the kind of a relationship 7 | /// 8 | public enum RelationshipKind 9 | { 10 | /// 11 | /// The relationship is an Association 12 | /// 13 | Association = 0, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/InternalTrees/OpDelegate.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.InternalTrees 4 | { 5 | /// 6 | /// Delegate that describes the processing 7 | /// 8 | /// RuleProcessing context 9 | /// Node to process 10 | internal delegate void OpDelegate(RuleProcessingContext context, Node node); 11 | } 12 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/GearsOfWarModel/City.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.GearsOfWarModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | using System.Data.Entity.Spatial; 7 | 8 | public class City 9 | { 10 | // non-integer key with not conventional name 11 | public string Name { get; set; } 12 | public DbGeography Location { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/ViewAssemblyChecker.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration 4 | { 5 | using System.Reflection; 6 | 7 | internal class ViewAssemblyChecker 8 | { 9 | public virtual bool IsViewAssembly(Assembly assembly) 10 | { 11 | return assembly.IsDefined(typeof(EntityViewGenerationAttribute), inherit: false); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/OriginalValueRecord.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | public abstract class OriginalValueRecord : DbUpdatableDataRecord 6 | { 7 | internal OriginalValueRecord(ObjectStateEntry cacheEntry, StateManagerTypeMetadata metadata, object userObject) 8 | : 9 | base(cacheEntry, metadata, userObject) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/SiteInfoMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace AdvancedPatternsVB 3 | 4 | Partial Friend Class SiteInfoMf 5 | 6 | Public Sub New() 7 | 8 | End Sub 9 | 10 | Public Sub New(ByVal zone As Integer, ByVal environment As String) 11 | Me.Zone = zone 12 | Me.Environment = environment 13 | End Sub 14 | 15 | End Class 16 | 17 | End Namespace 18 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/VbAdvancedPatterns.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/CommandLine/TestHelpers/TwoPropsWithSameSwitch.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine.Tests 4 | { 5 | extern alias migrate; 6 | 7 | public class TwoPropsWithSameSwitch 8 | { 9 | [migrate::CmdLine.CommandLineParameterAttribute("B")] 10 | public bool B1 { get; set; } 11 | 12 | [migrate::CmdLine.CommandLineParameterAttribute("B")] 13 | public bool B2 { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/Statement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Represents base class for the following statements: 7 | /// - QueryStatement 8 | /// - InsertStatement 9 | /// - UpdateStatement 10 | /// - DeleteStatement 11 | /// 12 | internal abstract class Statement : Node 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/DropAllDatabases.sql: -------------------------------------------------------------------------------- 1 | -- Generates a SQL script that will drop all databases (except system ones) on the current server. 2 | 3 | DECLARE @name nvarchar(255) 4 | 5 | DECLARE db CURSOR FOR 6 | SELECT Name FROM sysdatabases 7 | WHERE Name NOT IN ('master', 'tempdb', 'model', 'msdb') 8 | 9 | OPEN db; 10 | 11 | FETCH NEXT FROM db 12 | INTO @name; 13 | 14 | WHILE @@FETCH_STATUS = 0 15 | BEGIN 16 | PRINT 'DROP DATABASE "' + @name + '"' 17 | PRINT 'GO' 18 | 19 | FETCH NEXT FROM db 20 | INTO @name 21 | 22 | END 23 | CLOSE db; 24 | DEALLOCATE db; -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/Login.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System; 6 | 7 | public class Login 8 | { 9 | public Login() 10 | { 11 | } 12 | 13 | public Login(Guid id) 14 | { 15 | Id = id; 16 | } 17 | 18 | public Guid Id { get; set; } 19 | public string Username { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Utilities/ByteExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using Xunit; 6 | 7 | public class ByteExtensionsTests 8 | { 9 | [Fact] 10 | public void Should_be_able_to_get_hex_string_from_bytes() 11 | { 12 | var bytes = new byte[] { 0x0, 0x1, 0x2 }; 13 | 14 | Assert.Equal("000102", bytes.ToHexString()); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EntityFramework.PowerShell/Migrations/ProjectTypeNotSupportedException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations 4 | { 5 | using System.Data.Entity.Migrations.Infrastructure; 6 | 7 | [Serializable] 8 | public sealed class ProjectTypeNotSupportedException : MigrationsException 9 | { 10 | public ProjectTypeNotSupportedException(string message) 11 | : base(message) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/SharedAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System; 4 | using System.Reflection; 5 | using System.Resources; 6 | using System.Runtime.InteropServices; 7 | 8 | [assembly: SatelliteContractVersion("6.0.0.0")] 9 | [assembly: AssemblyCompany("Microsoft Corporation")] 10 | [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] 11 | [assembly: CLSCompliant(true)] 12 | [assembly: ComVisible(false)] 13 | [assembly: NeutralResourcesLanguage("en-US")] 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/MemberMappingKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping 4 | { 5 | /// 6 | /// Represents the various kind of member mapping 7 | /// 8 | internal enum MemberMappingKind 9 | { 10 | ScalarPropertyMapping = 0, 11 | 12 | NavigationPropertyMapping = 1, 13 | 14 | AssociationEndMapping = 2, 15 | 16 | ComplexPropertyMapping = 3, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaConfig.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class ArubaConfig 8 | { 9 | public int Id { get; set; } 10 | public string OS { get; set; } 11 | public string Lang { get; set; } 12 | public string Arch { get; set; } 13 | public ICollection Failures { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Infrastructure/ProviderInvariantNameTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using Xunit; 6 | 7 | public class ProviderInvariantNameTests 8 | { 9 | [Fact] 10 | public void Invariant_name_passed_to_constructor_is_returned() 11 | { 12 | Assert.Equal("That's Not My Name", new ProviderInvariantName("That's Not My Name").Name); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsMonsterModel/ExternalTypes/PhoneMm.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Another.Place 4 | { 5 | public class PhoneMm 6 | { 7 | public PhoneMm() 8 | { 9 | Extension = "None"; 10 | } 11 | 12 | public string PhoneNumber { get; set; } 13 | public string Extension { get; set; } 14 | public PhoneTypeMm PhoneType { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/TestHelpers/Fake/FakeEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | using System.Data.Entity.Internal; 6 | 7 | public class FakeEntity 8 | { 9 | public int Id { get; set; } 10 | 11 | internal static readonly PropertyEntryMetadata FakeNamedFooPropertyMetadata = new PropertyEntryMetadata( 12 | typeof(FakeEntity), typeof(string), "Foo", isMapped: false, isComplex: false); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/FunctionImportReturnTypeScalarPropertyMapping.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping 4 | { 5 | internal sealed class FunctionImportReturnTypeScalarPropertyMapping : FunctionImportReturnTypePropertyMapping 6 | { 7 | internal FunctionImportReturnTypeScalarPropertyMapping(string cMember, string sColumn, LineInfo lineInfo) 8 | : base(cMember, sColumn, lineInfo) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/PowerTools/Utilities/Check.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Microsoft.DbContextPackage.Utilities 4 | { 5 | using System; 6 | 7 | internal class Check 8 | { 9 | public static T NotNull(T value, string parameterName) where T : class 10 | { 11 | if (value == null) 12 | { 13 | throw new ArgumentNullException(parameterName); 14 | } 15 | 16 | return value; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/CommandTrees/Internal/ExpressionList.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.CommandTrees.Internal 4 | { 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | 8 | internal sealed class DbExpressionList : ReadOnlyCollection 9 | { 10 | internal DbExpressionList(IList elements) 11 | : base(elements) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/PowerTools/Guids.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | namespace Microsoft.DbContextPackage 3 | { 4 | using System; 5 | 6 | internal static class GuidList 7 | { 8 | public const string guidDbContextPackagePkgString = "2b119c79-9836-46e2-b5ed-eb766cebbf7c"; 9 | public const string guidDbContextPackageCmdSetString = "c769a05d-8d51-4919-bfe6-5f35a0eaf27e"; 10 | 11 | public static readonly Guid guidDbContextPackageCmdSet = new Guid(guidDbContextPackageCmdSetString); 12 | } 13 | } -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestHelpers/FullTrustAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity 4 | { 5 | /// 6 | /// When used in combination with , indicates 7 | /// that a method should not be run under partial trust. 8 | /// 9 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 10 | public class FullTrustAttribute : Attribute 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/ProviderInvariantName.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using System.Data.Entity.Utilities; 6 | 7 | internal class ProviderInvariantName : IProviderInvariantName 8 | { 9 | public ProviderInvariantName(string name) 10 | { 11 | DebugCheck.NotEmpty(name); 12 | 13 | Name = name; 14 | } 15 | 16 | public string Name { get; private set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/StoreModel/AWBuildVersion.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System; 6 | 7 | public class AWBuildVersion 8 | { 9 | public virtual byte SystemInformationID { get; set; } 10 | 11 | public virtual string Database_Version { get; set; } 12 | 13 | public virtual DateTime VersionDate { get; set; } 14 | 15 | public virtual DateTime ModifiedDate { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/CommandLine/TestHelpers/BadPositionArgNoOne.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine.Tests 4 | { 5 | extern alias migrate; 6 | 7 | public class BadPositionArgNoOne 8 | { 9 | // Note: There is no position 1 10 | [migrate::CmdLine.CommandLineParameterAttribute(Name = "source", ParameterIndex = 2, Required = true, 11 | Description = "Specifies the file(s) to copy.")] 12 | public string Source { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/ScopeEntryKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql 4 | { 5 | internal enum ScopeEntryKind 6 | { 7 | SourceVar, 8 | GroupKeyDefinition, 9 | ProjectionItemDefinition, 10 | FreeVar, 11 | 12 | /// 13 | /// Represents a group input scope entry that should no longer be referenced. 14 | /// 15 | InvalidGroupInputRef 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/MetadataArtifactAssemblyResolver.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | using System.Collections.Generic; 6 | using System.Reflection; 7 | 8 | internal abstract class MetadataArtifactAssemblyResolver 9 | { 10 | internal abstract bool TryResolveAssemblyReference(AssemblyName refernceName, out Assembly assembly); 11 | internal abstract IEnumerable GetWildcardAssemblies(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/PastEmployeeMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | public partial class PastEmployeeMf 6 | { 7 | public PastEmployeeMf() 8 | { 9 | } 10 | 11 | public PastEmployeeMf(string firstName, string lastName) 12 | : base(firstName, lastName) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Utilities/DbModelExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using System.Data.Entity.Infrastructure; 6 | using System.Xml.Linq; 7 | 8 | internal static class DbModelExtensions 9 | { 10 | public static XDocument GetModel(this DbModel model) 11 | { 12 | DebugCheck.NotNull(model); 13 | 14 | return DbContextExtensions.GetModel(w => EdmxWriter.WriteEdmx(model, w)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/LongKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | 8 | public class LongKeyEntity 9 | { 10 | [Key] 11 | [DatabaseGenerated(DatabaseGeneratedOption.None)] 12 | public long key { get; set; } 13 | 14 | public string Description { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/InternalTrees/ComputedVar.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.InternalTrees 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | /// 8 | /// A computed expression. Defined by a VarDefOp 9 | /// 10 | internal sealed class ComputedVar : Var 11 | { 12 | internal ComputedVar(int id, TypeUsage type) 13 | : base(id, VarType.Computed, type) 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaPerson.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class ArubaPerson 8 | { 9 | public int Id { get; set; } 10 | public string Name { get; set; } 11 | public ArubaPerson Partner { get; set; } 12 | public ICollection Children { get; set; } 13 | public ICollection Parents { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestHelpers/DefaultUnitTestsConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestHelpers 4 | { 5 | /// 6 | /// This connection factory is set in the but is then 7 | /// replaced in the OnLockingConfiguration event handler of that class. 8 | /// 9 | public class DefaultUnitTestsConnectionFactory : DefaultFunctionalTestsConnectionFactory 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/CurrentEmployeeMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | public partial class CurrentEmployeeMf 6 | { 7 | public CurrentEmployeeMf() 8 | { 9 | } 10 | 11 | public CurrentEmployeeMf(string firstName, string lastName) 12 | : base(firstName, lastName) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/SiteInfoMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | internal partial class SiteInfoMf 6 | { 7 | public SiteInfoMf() 8 | { 9 | } 10 | 11 | public SiteInfoMf(int? zone, string environment) 12 | { 13 | Zone = zone; 14 | Environment = environment; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/UnSpecifiedOrderingModel/CompositeKeyEntityWithNoOrdering.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace UnSpecifiedOrderingModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class CompositeKeyEntityWithNoOrdering 8 | { 9 | [Key] 10 | public int intKey { get; set; } 11 | 12 | [Key] 13 | public float floatKey { get; set; } 14 | 15 | [Key] 16 | public byte[] binaryKey { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/SchemaObjectModel/Action.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.SchemaObjectModel 4 | { 5 | /// 6 | /// Valid actions in an On<Operation> element 7 | /// 8 | internal enum Action 9 | { 10 | /// 11 | /// no action 12 | /// 13 | None, 14 | 15 | /// 16 | /// Cascade to other ends 17 | /// 18 | Cascade, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EntityFramework/Migrations/Utilities/EmptyContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations.Utilities 4 | { 5 | using System.Data.Common; 6 | 7 | internal class EmptyContext : DbContext 8 | { 9 | static EmptyContext() 10 | { 11 | Database.SetInitializer(null); 12 | } 13 | 14 | public EmptyContext(DbConnection existingConnection) 15 | : base(existingConnection, false) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/StructuralTypeMapping.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping 4 | { 5 | using System.Collections.ObjectModel; 6 | 7 | public abstract class StructuralTypeMapping 8 | { 9 | public abstract ReadOnlyCollection Properties { get; } 10 | 11 | internal abstract void AddProperty(StoragePropertyMapping propertyMapping); 12 | internal abstract void RemoveProperty(StoragePropertyMapping propertyMapping); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/Migrations/TestModel/CustomOperationExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations 4 | { 5 | using System.Data.Entity.Migrations.Infrastructure; 6 | 7 | internal static class CustomOperationExtensions 8 | { 9 | public static void Comment(this IDbMigration migration, string text, object anonymousArguments = null) 10 | { 11 | migration.AddOperation(new CommentOperation(text, anonymousArguments)); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaOwner.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class ArubaOwner 8 | { 9 | public int Id { get; set; } 10 | public string FirstName { get; set; } 11 | public string LastName { get; set; } 12 | public string Alias { get; set; } 13 | public ArubaRun OwnedRun { get; set; } 14 | public ICollection Bugs { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Core/Metadata/Edm/MetadataCacheTests.msl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/EdmSchemaErrorSeverity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | // if you edit this file be sure you change GeneratorErrorSeverity 6 | // also, they must stay in sync 7 | 8 | /// 9 | /// 10 | public enum EdmSchemaErrorSeverity 11 | { 12 | /// 13 | /// 14 | Warning = 0, 15 | 16 | /// 17 | /// 18 | Error = 1, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/EmployeeMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | public abstract partial class EmployeeMf 6 | { 7 | protected EmployeeMf() 8 | { 9 | } 10 | 11 | protected EmployeeMf(string firstName, string lastName) 12 | { 13 | FirstName = firstName; 14 | LastName = lastName; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/GearsOfWarModel/Weapon.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.GearsOfWarModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public abstract class Weapon 8 | { 9 | public int? Id { get; set; } 10 | public string Name { get; set; } 11 | 12 | // 1 - 1 self reference 13 | public virtual Weapon SynergyWith { get; set; } 14 | 15 | [Timestamp] 16 | public byte[] Timestamp { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Utilities/DbModelExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using Xunit; 6 | 7 | public class DbModelExtensionsTests 8 | { 9 | [Fact] 10 | public void Should_be_able_to_get_xdocument_from_model() 11 | { 12 | var model = new DbModelBuilder().Build(ProviderRegistry.Sql2008_ProviderInfo); 13 | 14 | var edmX = model.GetModel(); 15 | 16 | Assert.NotNull(edmX); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/AST/LiteralKind.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql.AST 4 | { 5 | /// 6 | /// Defines literal value kind, including the eSQL untyped NULL. 7 | /// 8 | internal enum LiteralKind 9 | { 10 | Number, 11 | String, 12 | UnicodeString, 13 | Boolean, 14 | Binary, 15 | DateTime, 16 | Time, 17 | DateTimeOffset, 18 | Guid, 19 | Null 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/IGetAlternativeName.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql 4 | { 5 | internal interface IGetAlternativeName 6 | { 7 | /// 8 | /// If current scope entry reperesents an alternative group key name (see SemanticAnalyzer.ProcessGroupByClause(...) for more info) 9 | /// then this property returns the alternative name, otherwise null. 10 | /// 11 | string[] AlternativeName { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/InternalTrees/SetOpVar.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.InternalTrees 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | /// 8 | /// A SetOp Var - used as the output var for set operations (Union, Intersect, Except) 9 | /// 10 | internal sealed class SetOpVar : Var 11 | { 12 | internal SetOpVar(int id, TypeUsage type) 13 | : base(id, VarType.SetOp, type) 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/AdvancedPatternsModelFirstContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | internal partial class AdvancedPatternsModelFirstContext 6 | { 7 | public AdvancedPatternsModelFirstContext(string nameOrConnectionString) 8 | : base(nameOrConnectionString) 9 | { 10 | Configuration.LazyLoadingEnabled = false; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/Utilities/FuncExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.SqlServer.Utilities 4 | { 5 | internal static class FuncExtensions 6 | { 7 | internal static TResult NullIfNotImplemented(this Func func) 8 | { 9 | try 10 | { 11 | return func(); 12 | } 13 | catch (NotImplementedException) 14 | { 15 | return default(TResult); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AllTypeKeysModel/CompositeKeyEntity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AllTypeKeysModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | 7 | public class CompositeKeyEntity 8 | { 9 | [Key] 10 | public int intKey { get; set; } 11 | 12 | [Key] 13 | public string stringKey { get; set; } 14 | 15 | [Key] 16 | public byte[] binaryKey { get; set; } 17 | 18 | public string Details { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Core/Metadata/Edm/MetadataCacheTests.csdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/BackOrderLine2Mm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class BackOrderLine2Mm 14 | Inherits BackOrderLineMm 15 | 16 | End Class 17 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Runtime.CompilerServices; 4 | 5 | [assembly: 6 | InternalsVisibleTo( 7 | "EntityFramework.FunctionalTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" 8 | )] -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Core/Metadata/Edm/MetadataCacheTests.ssdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IProviderInvariantName.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using System.Data.Common; 6 | using System.Data.Entity.Config; 7 | 8 | /// 9 | /// Used by and when resolving 10 | /// a provider invariant name from a . 11 | /// 12 | public interface IProviderInvariantName 13 | { 14 | string Name { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Migrations/Model/NotSupportedOperation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations.Model 4 | { 5 | public class NotSupportedOperation : MigrationOperation 6 | { 7 | internal static readonly NotSupportedOperation Instance = new NotSupportedOperation(); 8 | 9 | private NotSupportedOperation() 10 | : base(null) 11 | { 12 | } 13 | 14 | public override bool IsDestructiveChange 15 | { 16 | get { return false; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Utilities/HashSetExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using System.Collections.Generic; 6 | 7 | internal static class HashSetExtensions 8 | { 9 | public static void AddRange(this HashSet set, IEnumerable items) 10 | { 11 | DebugCheck.NotNull(set); 12 | DebugCheck.NotNull(items); 13 | 14 | foreach (var i in items) 15 | { 16 | set.Add(i); 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/PowerTools/PkgCmdID.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | namespace Microsoft.DbContextPackage 3 | { 4 | internal static class PkgCmdIDList 5 | { 6 | public const uint cmdidViewEntityDataModel = 0x100; 7 | public const uint cmdidViewEntityDataModelXml = 0x200; 8 | public const uint cmdidPrecompileEntityDataModelViews = 0x300; 9 | public const uint cmdidViewEntityModelDdl = 0x400; 10 | public const uint cmdidReverseEngineerCodeFirst = 0x001; 11 | public const uint cmdidCustomizeReverseEngineerTemplates = 0x005; 12 | } 13 | } -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/CustomerDiscount.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System; 6 | 7 | public class CustomerDiscount 8 | { 9 | public virtual int CustomerID { get; set; } 10 | 11 | public virtual Customer Customer { get; set; } 12 | 13 | public virtual decimal Discount { get; set; } 14 | 15 | public virtual Guid rowguid { get; set; } 16 | 17 | public virtual DateTime ModifiedDate { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/ProcessVbTemplate.bat: -------------------------------------------------------------------------------- 1 | copy /Y %SDXROOT%\ndp\fx\src\DataEntityDesign\Design\T4Templates\VBDbContext.ContextV4.5.tt %SDXROOT%\qa\Devdiv\dptest\DataEntity\CheckinTests\CodeFirst\ProductivityVBTests\%1\%1.Context.tt 2 | copy /Y %SDXROOT%\ndp\fx\src\DataEntityDesign\Design\T4Templates\VBDbContext.TypesV4.5.tt %SDXROOT%\qa\Devdiv\dptest\DataEntity\CheckinTests\CodeFirst\ProductivityVBTests\%1\%1.tt 3 | 4 | TemplateReplace %SDXROOT%\qa\Devdiv\dptest\DataEntity\CheckinTests\CodeFirst\ProductivityVBTests\%1\%1.Context.tt %2 5 | TemplateReplace %SDXROOT%\qa\Devdiv\dptest\DataEntity\CheckinTests\CodeFirst\ProductivityVBTests\%1\%1.tt %2 6 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | using System.Runtime.CompilerServices; 4 | 5 | // For Moq 6 | 7 | [assembly: 8 | InternalsVisibleTo( 9 | "DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" 10 | )] 11 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Spatial/DbSpatialServicesTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Spatial 4 | { 5 | using Moq; 6 | using Xunit; 7 | 8 | public class DbSpatialServicesTests 9 | { 10 | [Fact] 11 | public void NativeTypesAvailable_returns_true() 12 | { 13 | Assert.True( 14 | new Mock 15 | { 16 | CallBase = true 17 | }.Object.NativeTypesAvailable); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleMigrationsModel/201112202056573_AddUrlToBlog.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.SimpleMigrationsModel 4 | { 5 | using System.Data.Entity.Migrations; 6 | 7 | public partial class AddUrlToBlog : DbMigration 8 | { 9 | public override void Up() 10 | { 11 | AddColumn("Blogs", "Url", c => c.String()); 12 | } 13 | 14 | public override void Down() 15 | { 16 | DropColumn("Blogs", "Url"); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaRun.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Collections.Generic; 6 | using System.Data.Entity.Spatial; 7 | 8 | public class ArubaRun 9 | { 10 | public int Id { get; set; } 11 | public string Name { get; set; } 12 | public int Purpose { get; set; } 13 | public ArubaOwner RunOwner { get; set; } 14 | public ICollection Tasks { get; set; } 15 | public DbGeometry Geometry { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /samples/Provider/SampleEntityFrameworkProvider/Factory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | using System; 3 | using System.Data.Common; 4 | 5 | namespace SampleEntityFrameworkProvider 6 | { 7 | public partial class SampleFactory : IServiceProvider 8 | { 9 | //Implement IServiceProvider 10 | object IServiceProvider.GetService(Type serviceType) 11 | { 12 | if (serviceType == typeof(DbProviderServices)) 13 | return SampleProviderServices.Instance; 14 | else 15 | return null; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/PerfType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration 4 | { 5 | internal enum PerfType 6 | { 7 | InitialSetup = 0, 8 | CellCreation, 9 | KeyConstraint, 10 | ViewgenContext, 11 | UpdateViews, 12 | DisjointConstraint, 13 | PartitionConstraint, 14 | DomainConstraint, 15 | ForeignConstraint, 16 | QueryViews, 17 | BoolResolution, 18 | Unsatisfiability, 19 | ViewParsing, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/Configuration/IConfigurationConvention`.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Data.Entity.ModelConfiguration.Configuration; 6 | using System.Reflection; 7 | 8 | public interface IConfigurationConvention : IConvention 9 | where TMemberInfo : MemberInfo 10 | where TConfiguration : ConfigurationBase 11 | { 12 | void Apply(TMemberInfo memberInfo, Func configuration); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/AdvancedPatternsModel/Office.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace AdvancedPatternsModel 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | public class Office : UnMappedOfficeBase 9 | { 10 | public Office() 11 | { 12 | WhiteBoards = new List(); 13 | } 14 | 15 | public Guid BuildingId { get; set; } 16 | public Building Building { get; set; } 17 | public IList WhiteBoards { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/Provider/publish.cmd: -------------------------------------------------------------------------------- 1 | pushd EdmGenTests 2 | del NorthwindEF.* 3 | del SampleEntityFrameworkProvider.dll 4 | del EdmGen.exe 5 | popd 6 | pushd SampleEntityFrameworkProvider 7 | rd /q /s bin 8 | rd /q /s obj 9 | popd 10 | pushd ConsoleTests 11 | rd /q /s bin 12 | rd /q /s obj 13 | popd 14 | pushd DdexProvider 15 | rd /q /s bin 16 | rd /q /s obj 17 | popd 18 | pushd NorthwindEFModel 19 | rd /q /s bin 20 | rd /q /s obj 21 | popd 22 | pushd FunctionStubGenerator 23 | rd /q /s bin 24 | rd /q /s obj 25 | popd 26 | del /A:H SampleEntityFrameworkProvider.suo 27 | attrib /S -R *.* 28 | pushd .. 29 | del EFSampleProvider.zip 30 | zip -9 -X -r EFSampleProvider.zip EFSampleProvider 31 | popd 32 | -------------------------------------------------------------------------------- /src/Migrate/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | #if !INTERNALS_INVISIBLE 4 | 5 | using System.Runtime.CompilerServices; 6 | 7 | [assembly: 8 | InternalsVisibleTo( 9 | "EntityFramework.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293" 10 | )] 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/PowerTools/Utilities/DebugCheck.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Microsoft.DbContextPackage.Utilities 4 | { 5 | using System.Diagnostics; 6 | 7 | internal class DebugCheck 8 | { 9 | [Conditional("DEBUG")] 10 | public static void NotNull(T value) where T : class 11 | { 12 | Debug.Assert(value != null); 13 | } 14 | 15 | [Conditional("DEBUG")] 16 | public static void NotEmpty(string value) 17 | { 18 | Debug.Assert(!string.IsNullOrWhiteSpace(value)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ViewGeneration/Structures/CellTreeOpType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping.ViewGeneration.Structures 4 | { 5 | // This enum identifies for which side we are generating the view 6 | 7 | // Different operations that are used in the CellTreeNode nodes 8 | internal enum CellTreeOpType 9 | { 10 | Leaf, // Leaf Node 11 | Union, // union all 12 | FOJ, // full outerjoin 13 | LOJ, // left outerjoin 14 | IJ, // inner join 15 | LASJ // left antisemijoin 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Internal/ConfigFile/MigrationSqlGeneratorElement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal.ConfigFile 4 | { 5 | using System.Configuration; 6 | 7 | internal class MigrationSqlGeneratorElement : ConfigurationElement 8 | { 9 | private const string TypeKey = "type"; 10 | 11 | [ConfigurationProperty(TypeKey, IsRequired = true)] 12 | public string SqlGeneratorTypeName 13 | { 14 | get { return (string)this[TypeKey]; } 15 | set { this[TypeKey] = value; } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/CommandLine/TestHelpers/InferredTestArgs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine.Tests 4 | { 5 | using System; 6 | 7 | /// 8 | /// An argument class that uses inferred attributes 9 | /// 10 | public class InferredTestArgs 11 | { 12 | public string StringArg { get; set; } 13 | 14 | public bool BoolT { get; set; } 15 | 16 | public bool BoolY { get; set; } 17 | 18 | public DateTime Date { get; set; } 19 | 20 | public int Number { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/Utilities/PrimitiveTypeExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.SqlServer.Utilities 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | 7 | internal static class PrimitiveTypeExtensions 8 | { 9 | internal static bool IsSpatialType(this PrimitiveType type) 10 | { 11 | DebugCheck.NotNull(type); 12 | 13 | var kind = type.PrimitiveTypeKind; 14 | 15 | return kind >= PrimitiveTypeKind.Geometry && kind <= PrimitiveTypeKind.GeographyCollection; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/BuildingMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Imports System 3 | 4 | Namespace AdvancedPatternsVB 5 | 6 | Partial Public Class BuildingMf 7 | 8 | Public Sub New() 9 | 10 | End Sub 11 | 12 | Public Sub New(ByVal buildingId As Guid, ByVal name As String, ByVal value As Decimal, ByVal address As AddressMf) 13 | Me.BuildingId = buildingId 14 | Me.Name = name 15 | Me.Value = value 16 | Me.Address = address 17 | End Sub 18 | 19 | End Class 20 | 21 | End Namespace 22 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/SupplierLogoMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class SupplierLogoMm 14 | Public Property SupplierId As Integer 15 | Public Property Logo As Byte() 16 | 17 | End Class 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/internal/materialization/TranslatorArg.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.Internal.Materialization 4 | { 5 | /// 6 | /// Struct containing the requested type and parent column map used 7 | /// as the arg in the Translator visitor. 8 | /// 9 | internal struct TranslatorArg 10 | { 11 | internal readonly Type RequestedType; 12 | 13 | internal TranslatorArg(Type requestedType) 14 | { 15 | RequestedType = requestedType; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/BuildingMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | using System; 6 | 7 | public partial class BuildingMf 8 | { 9 | public BuildingMf(Guid buildingId, string name, decimal value, AddressMf address) 10 | : this() 11 | { 12 | BuildingId = buildingId; 13 | Name = name; 14 | Value = value; 15 | Address = address; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/BarcodeDetailMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class BarcodeDetailMm 14 | Public Property Code As Byte() 15 | Public Property RegisteredTo As String 16 | 17 | End Class 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Internal/EntityEntries/ObjectContextTypeCache.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | using System.Collections.Concurrent; 6 | using System.Data.Entity.Core.Objects; 7 | 8 | internal static class ObjectContextTypeCache 9 | { 10 | private static readonly ConcurrentDictionary _typeCache = new ConcurrentDictionary(); 11 | 12 | public static Type GetObjectType(Type type) 13 | { 14 | return _typeCache.GetOrAdd(type, ObjectContext.GetObjectType); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/SimpleModel/DisabledInitializerContext.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Data.Entity; 6 | 7 | public class DisabledByConfigInitializerContext : DbContext 8 | { 9 | } 10 | 11 | public class DisabledByConfigWithInitializerAlsoSetInConfigContext : DbContext 12 | { 13 | } 14 | 15 | public class DisabledByLegacyConfigInitializerContext : DbContext 16 | { 17 | } 18 | 19 | public class DisabledByLegacyConfigWithEmptyInitializerContext : DbContext 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/CustomerInfoMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class CustomerInfoMm 14 | Public Property CustomerInfoId As Integer 15 | Public Property Information As String 16 | 17 | End Class 18 | -------------------------------------------------------------------------------- /samples/Provider/DdexProvider/ExtendedProvider.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Program 5 | $(DevEnvDir)devenv.exe 6 | /rootsuffix Exp /log 7 | 8 | 9 | Program 10 | $(DevEnvDir)devenv.exe 11 | /rootsuffix Exp 12 | 13 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/CommandTrees/DbGroupAggregate.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.CommandTrees 4 | { 5 | using System.Data.Entity.Core.Common.CommandTrees.Internal; 6 | using System.Data.Entity.Core.Metadata.Edm; 7 | 8 | /// Represents a collection of elements that compose a group. 9 | public sealed class DbGroupAggregate : DbAggregate 10 | { 11 | internal DbGroupAggregate(TypeUsage resultType, DbExpressionList arguments) 12 | : base(resultType, arguments) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/ModelConfiguration/Edm/EntitySetExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Edm 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | using Xunit; 7 | 8 | public sealed class EntitySetExtensionsTests 9 | { 10 | [Fact] 11 | public void Can_get_and_set_configuration_annotation() 12 | { 13 | var entitySet = new EntitySet(); 14 | 15 | entitySet.SetConfiguration(42); 16 | 17 | Assert.Equal(42, entitySet.GetConfiguration()); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/CurrentValueRecord.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | public abstract class CurrentValueRecord : DbUpdatableDataRecord 6 | { 7 | internal CurrentValueRecord(ObjectStateEntry cacheEntry, StateManagerTypeMetadata metadata, object userObject) 8 | : 9 | base(cacheEntry, metadata, userObject) 10 | { 11 | } 12 | 13 | internal CurrentValueRecord(ObjectStateEntry cacheEntry) 14 | : 15 | base(cacheEntry) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/PowerTools/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | #if !INTERNALS_INVISIBLE 3 | 4 | using System.Runtime.CompilerServices; 5 | 6 | // For Moq 7 | [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] 8 | 9 | [assembly: InternalsVisibleTo("EFPowerTools.Test")] 10 | 11 | #endif -------------------------------------------------------------------------------- /tools/EF.opencover.xunit: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsAdvancedPatterns/Partials/AddressMf.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.ProductivityApi.TemplateModels.CsAdvancedPatterns 4 | { 5 | public partial class AddressMf 6 | { 7 | public AddressMf(string street, string city, string state, string zipCode, int? zone, string environment) 8 | { 9 | Street = street; 10 | City = city; 11 | State = state; 12 | ZipCode = zipCode; 13 | SiteInfo = new SiteInfoMf(zone, environment); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Internal/TestHelpers/InternalEntityEntryForMock.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal 4 | { 5 | using Moq; 6 | 7 | internal class InternalEntityEntryForMock : InternalEntityEntry 8 | where TEntity : class, new() 9 | { 10 | public InternalEntityEntryForMock() 11 | : base(new Mock 12 | { 13 | CallBase = true 14 | }.Object, MockHelper.CreateMockStateEntry().Object) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ConcurrencyInfoMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class ConcurrencyInfoMm 14 | Public Property Token As String 15 | Public Property QueriedDateTime As Nullable(Of Date) 16 | 17 | End Class 18 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/SuspiciousActivityMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class SuspiciousActivityMm 14 | Public Property SuspiciousActivityId As Integer 15 | Public Property Activity As String 16 | 17 | End Class 18 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/ValidationSeverity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | /// 6 | /// The validation severity level 7 | /// 8 | internal enum ValidationSeverity 9 | { 10 | /// 11 | /// Warning 12 | /// 13 | Warning, 14 | 15 | /// 16 | /// Error 17 | /// 18 | Error, 19 | 20 | /// 21 | /// Internal 22 | /// 23 | Internal 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/IntBox.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects 4 | { 5 | /// 6 | /// This class is used in Referential Integrity Constraints feature. 7 | /// It is used to get around the problem of enumerating dictionary contents, 8 | /// but allowing update of the value without breaking the enumerator. 9 | /// 10 | internal sealed class IntBox 11 | { 12 | internal IntBox(int val) 13 | { 14 | Value = val; 15 | } 16 | 17 | internal int Value { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/DefaultDbProviderFactoryService.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | 4 | #if !NET40 5 | 6 | namespace System.Data.Entity.Infrastructure 7 | { 8 | using System.Data.Common; 9 | using System.Data.Entity.Utilities; 10 | 11 | internal class DefaultDbProviderFactoryService : IDbProviderFactoryService 12 | { 13 | public DbProviderFactory GetProviderFactory(DbConnection connection) 14 | { 15 | Check.NotNull(connection, "connection"); 16 | 17 | return DbProviderFactories.GetFactory(connection); 18 | } 19 | } 20 | } 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/StoreModel/SalesReason.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace FunctionalTests.Model 4 | { 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | public class SalesReason 9 | { 10 | public virtual int SalesReasonID { get; set; } 11 | 12 | public virtual string Name { get; set; } 13 | 14 | public virtual string ReasonType { get; set; } 15 | 16 | public virtual DateTime ModifiedDate { get; set; } 17 | 18 | public virtual ICollection SalesOrderHeaders { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Core/Metadata/Edm/EnumTypeTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | using Xunit; 6 | 7 | public class EnumTypeTests 8 | { 9 | [Fact] 10 | public void Can_set_and_get_underlying_type() 11 | { 12 | var enumType = new EnumType(); 13 | 14 | var primitiveType = PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int64); 15 | 16 | enumType.UnderlyingType = primitiveType; 17 | 18 | Assert.Same(primitiveType, enumType.UnderlyingType); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/Provider/ProviderTests/TestBase.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | using System.Configuration; 3 | using System.Data.Common; 4 | 5 | namespace ProviderTests 6 | { 7 | public class TestBase 8 | { 9 | protected const string SampleProviderName = "SampleEntityFrameworkProvider"; 10 | protected static readonly string NorthwindDirectConnectionString = ConfigurationManager.ConnectionStrings["NorthwindDirect"].ConnectionString; 11 | protected static readonly string NorthwindEntitiesConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindEntities"].ConnectionString; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/ObjectMslConstructs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping 4 | { 5 | /// 6 | /// Defines all the string constrcuts defined in OC MSL specification 7 | /// 8 | internal static class ObjectMslConstructs 9 | { 10 | internal const string MappingElement = "Mapping"; 11 | internal const string AliasElement = "Alias"; 12 | internal const string AliasKeyAttribute = "Key"; 13 | internal const string AliasValueAttribute = "Value"; 14 | internal const char IdentitySeperator = ':'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/Metadata/MetadataCachingModel.msl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Utilities/AssemblyExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using System.Data.Entity.Migrations; 6 | using Xunit; 7 | 8 | public class AssemblyExtensionsTests 9 | { 10 | public class GetInformationalVersion : TestBase 11 | { 12 | [Fact] 13 | public void GetInformationalVersion_returns_the_informational_version() 14 | { 15 | Assert.True(typeof(DbMigrator).Assembly.GetInformationalVersion().StartsWith("6.0.0-beta1")); 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Objects/DataClasses/EdmComplexPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Objects.DataClasses 4 | { 5 | /// 6 | /// Attribute for complex properties 7 | /// Implied default AttributeUsage properties Inherited=True, AllowMultiple=False, 8 | /// The metadata system expects this and will only look at the first of each of these attributes, even if there are more. 9 | /// 10 | [AttributeUsage(AttributeTargets.Property)] 11 | public sealed class EdmComplexPropertyAttribute : EdmPropertyAttribute 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/EntityFramework/ModelConfiguration/Conventions/IConvention.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Conventions 4 | { 5 | using System.Diagnostics.CodeAnalysis; 6 | 7 | /// 8 | /// Identifies conventions that can be added to or removed from a instance. 9 | /// 10 | /// 11 | /// Note that implementations of this interface must be immutable. 12 | /// 13 | [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 14 | public interface IConvention 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/ConcurrencyModel/Chassis.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace ConcurrencyModel 4 | { 5 | using System.ComponentModel.DataAnnotations; 6 | using System.ComponentModel.DataAnnotations.Schema; 7 | 8 | public class Chassis 9 | { 10 | [Timestamp] 11 | public byte[] Version { get; set; } 12 | 13 | [Key] 14 | [DatabaseGenerated(DatabaseGeneratedOption.None)] 15 | public int TeamId { get; set; } 16 | 17 | public string Name { get; set; } 18 | 19 | public virtual Team Team { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaBug.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | public enum ArubaBugResolution 6 | { 7 | ByDesign = 1, 8 | Fixed = 2, 9 | NoRepro = 3, 10 | WontFix = 4, 11 | None = 0, 12 | } 13 | 14 | public class ArubaBug 15 | { 16 | public int Id { get; set; } 17 | public int Number { get; set; } 18 | public string Comment { get; set; } 19 | public ArubaFailure Failure { get; set; } 20 | public ArubaBugResolution? Resolution { get; set; } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Spatial/DefaultServicesTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Spatial 4 | { 5 | using System.Data.Entity.Resources; 6 | using Xunit; 7 | 8 | public class DefaultServicesTests 9 | { 10 | [Fact] 11 | public void Use_of_default_spatial_services_for_non_trival_operations_throws() 12 | { 13 | Assert.Equal( 14 | Strings.SpatialProviderNotUsable, 15 | Assert.Throws(() => DefaultSpatialServices.Instance.GeographyLineFromBinary(null, 0)).Message); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/AdvancedPatternsModelFirstContext.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | Imports System.Data.Entity.Config 4 | Imports System.Data.Entity.TestHelpers 5 | 6 | Namespace AdvancedPatternsVB 7 | 8 | _ 9 | Partial Friend Class AdvancedPatternsModelFirstContext 10 | 11 | Public Sub New(ByVal nameOrConnectionString As String) 12 | MyBase.New(nameOrConnectionString) 13 | MyBase.Configuration.LazyLoadingEnabled = False 14 | End Sub 15 | 16 | End Class 17 | 18 | End Namespace 19 | 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/DimensionsMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class DimensionsMm 14 | Public Property Width As Decimal 15 | Public Property Height As Decimal 16 | Public Property Depth As Decimal 17 | 18 | End Class 19 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Mapping/FunctionImportReturnTypePropertyMapping.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Mapping 4 | { 5 | internal abstract class FunctionImportReturnTypePropertyMapping 6 | { 7 | internal readonly string CMember; 8 | internal readonly string SColumn; 9 | internal readonly LineInfo LineInfo; 10 | 11 | internal FunctionImportReturnTypePropertyMapping(string cMember, string sColumn, LineInfo lineInfo) 12 | { 13 | CMember = cMember; 14 | SColumn = sColumn; 15 | LineInfo = lineInfo; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/TemplateModels/CsMonsterModel/ExternalTypes/AuditInfoMm.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace Another.Place 4 | { 5 | using System; 6 | using FunctionalTests.ProductivityApi.TemplateModels.CsMonsterModel; 7 | 8 | public class AuditInfoMm 9 | { 10 | public AuditInfoMm() 11 | { 12 | Concurrency = new ConcurrencyInfoMm(); 13 | } 14 | 15 | public DateTime ModifiedDate { get; set; } 16 | public string ModifiedBy { get; set; } 17 | 18 | public ConcurrencyInfoMm Concurrency { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/TestModels/ArubaModel/ArubaFailure.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.TestModels.ArubaModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class ArubaFailure 8 | { 9 | public int Id { get; set; } 10 | public int TestId { get; set; } 11 | public string TestCase { get; set; } 12 | public int Variation { get; set; } 13 | public DateTime Changed { get; set; } 14 | public string Log { get; set; } 15 | public ICollection Configs { get; set; } 16 | public ICollection Bugs { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/EntityFramework/Core/Metadata/Edm/EdmItemError.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | /// 6 | /// Class representing Edm error for an inmemory EdmItem 7 | /// 8 | internal class EdmItemError : EdmError 9 | { 10 | /// 11 | /// Construct the EdmItemError with an error message 12 | /// 13 | /// The error message for this validation error 14 | public EdmItemError(string message) 15 | : base(message) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/DataAnnotations/Schema/NotMappedAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | 4 | #if NET40 5 | 6 | namespace System.ComponentModel.DataAnnotations.Schema 7 | { 8 | using System.Diagnostics.CodeAnalysis; 9 | 10 | /// 11 | /// Denotes that a property or class should be excluded from database mapping. 12 | /// 13 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, AllowMultiple = false)] 14 | [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] 15 | public class NotMappedAttribute : Attribute 16 | { 17 | } 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/Core/Metadata/Edm/EdmSchemaErrorTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Metadata.Edm 4 | { 5 | using Xunit; 6 | 7 | public class EdmSchemaErrorTests 8 | { 9 | [Fact] 10 | public void EdmSchemaError_stores_passed_arguments() 11 | { 12 | var schemaError = new EdmSchemaError("message", 100, EdmSchemaErrorSeverity.Error); 13 | 14 | Assert.Equal("message", schemaError.Message); 15 | Assert.Equal(100, schemaError.ErrorCode); 16 | Assert.Equal(EdmSchemaErrorSeverity.Error, schemaError.Severity); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/DriverMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class DriverMm 14 | Public Property Name As String 15 | Public Property BirthDate As Date 16 | 17 | Public Overridable Property License As LicenseMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/BackOrderLineMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class BackOrderLineMm 14 | Inherits OrderLineMm 15 | Public Property ETA As Date 16 | 17 | Public Overridable Property Supplier As SupplierMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/OrderNoteMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class OrderNoteMm 14 | Public Property NoteId As Integer 15 | Public Property Note As String 16 | 17 | Public Overridable Property Order As OrderMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/ExpressionResolution.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql 4 | { 5 | /// 6 | /// Abstract class representing the result of an eSQL expression classification. 7 | /// 8 | internal abstract class ExpressionResolution 9 | { 10 | protected ExpressionResolution(ExpressionResolutionClass @class) 11 | { 12 | ExpressionClass = @class; 13 | } 14 | 15 | internal readonly ExpressionResolutionClass ExpressionClass; 16 | internal abstract string ExpressionClassName { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/TestModels/SimpleModel/Category.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace SimpleModel 4 | { 5 | using System.Collections.Generic; 6 | 7 | public class Category 8 | { 9 | public Category() 10 | { 11 | Products = new List(); 12 | } 13 | 14 | public Category(string id) 15 | : this() 16 | { 17 | Id = id; 18 | } 19 | 20 | public string Id { get; set; } 21 | public ICollection Products { get; set; } 22 | public string DetailedDescription { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/PowerTools.Test/Extensions/StringExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | namespace Microsoft.DbContextPackage.Extensions 3 | { 4 | using Xunit; 5 | 6 | public class StringExtensionsTests 7 | { 8 | [Fact] 9 | public void EqualsIgnoreCase_tests_equality() 10 | { 11 | Assert.True(StringExtensions.EqualsIgnoreCase(null, null)); 12 | Assert.True("one".EqualsIgnoreCase("one")); 13 | Assert.True("two".EqualsIgnoreCase("TWO")); 14 | Assert.False("three".EqualsIgnoreCase("four")); 15 | Assert.False("five".EqualsIgnoreCase(null)); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/EntityFramework.SqlServer/Utilities/MetdataItemExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.SqlServer.Utilities 4 | { 5 | using System.Data.Entity.Core.Metadata.Edm; 6 | using System.Linq; 7 | 8 | internal static class MetdataItemExtensions 9 | { 10 | public static T GetMetadataPropertyValue(this MetadataItem item, string propertyName) 11 | { 12 | DebugCheck.NotNull(item); 13 | 14 | var property = item.MetadataProperties.FirstOrDefault(p => p.Name == propertyName); 15 | return property == null ? default(T) : (T)property.Value; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/Utils/Boolean/LiteralVertexPair.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.Utils.Boolean 4 | { 5 | /// 6 | /// VertexLiteral pair, used for ConversionContext.GetSuccessors 7 | /// 8 | internal sealed class LiteralVertexPair 9 | { 10 | internal readonly Vertex Vertex; 11 | internal readonly Literal Literal; 12 | 13 | internal LiteralVertexPair(Vertex vertex, Literal literal) 14 | { 15 | Vertex = vertex; 16 | Literal = literal; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Query/InternalTrees/RowCount.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Query.InternalTrees 4 | { 5 | /// 6 | /// Enum describing row counts 7 | /// 8 | internal enum RowCount : byte 9 | { 10 | /// 11 | /// Zero rows 12 | /// 13 | Zero = 0, 14 | 15 | /// 16 | /// One row 17 | /// 18 | One = 1, 19 | 20 | /// 21 | /// Unbounded (unknown number of rows) 22 | /// 23 | Unbounded = 2, 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/EntityFramework/Infrastructure/IDbInterceptor.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Infrastructure 4 | { 5 | using System.Diagnostics.CodeAnalysis; 6 | 7 | /// 8 | /// This is the base interface for all interfaces that provide interception points for various 9 | /// different types and operations. For example, see . 10 | /// Interceptors are registered on the class. 11 | /// 12 | [SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 13 | public interface IDbInterceptor 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/EntityFramework/Internal/Linq/IInternalSetAdapter.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Internal.Linq 4 | { 5 | /// 6 | /// An internal interface implemented by and that allows access to 7 | /// the internal set without using reflection. 8 | /// 9 | internal interface IInternalSetAdapter 10 | { 11 | #region Underlying internal set 12 | 13 | /// 14 | /// The underlying internal set. 15 | /// 16 | IInternalSet InternalSet { get; } 17 | 18 | #endregion 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ProductPageViewMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class ProductPageViewMm 14 | Inherits PageViewMm 15 | Public Property ProductId As Integer 16 | 17 | Public Overridable Property Product As ProductMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/RSATokenMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class RSATokenMm 14 | Public Property Serial As String 15 | Public Property Issued As Date 16 | 17 | Public Overridable Property Login As Another.Place.LoginMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /src/Migrate/CmdLine/CommandEnvironment.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace CmdLine 4 | { 5 | using System; 6 | 7 | public class CommandEnvironment : ICommandEnvironment 8 | { 9 | public string CommandLine 10 | { 11 | get { return Environment.CommandLine; } 12 | } 13 | 14 | private string[] args; 15 | 16 | public string[] GetCommandLineArgs() 17 | { 18 | return args ?? (args = Environment.GetCommandLineArgs()); 19 | } 20 | 21 | public string Program 22 | { 23 | get { return GetCommandLineArgs()[0]; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests.Transitional/Metadata/MetadataCachingModel.csdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/Migrations/TestModel/CommentOperation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Migrations 4 | { 5 | using System.Data.Entity.Migrations.Model; 6 | 7 | internal class CommentOperation : MigrationOperation 8 | { 9 | public CommentOperation(string text, object anonymousArguments = null) 10 | : base(anonymousArguments) 11 | { 12 | Text = text; 13 | } 14 | 15 | public override bool IsDestructiveChange 16 | { 17 | get { return false; } 18 | } 19 | 20 | public string Text { get; private set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbAdvancedPatterns/Partials/AddressMf.vb: -------------------------------------------------------------------------------- 1 | ' Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | Namespace AdvancedPatternsVB 3 | 4 | Partial Public Class AddressMf 5 | 6 | Public Sub New() 7 | 8 | End Sub 9 | 10 | Public Sub New(ByVal street As String, ByVal city As String, ByVal state As String, ByVal zipCode As String, ByVal zone As Integer, ByVal environment As String) 11 | Me.Street = street 12 | Me.City = city 13 | Me.State = state 14 | Me.ZipCode = zipCode 15 | SiteInfo = New SiteInfoMf(zone, environment) 16 | End Sub 17 | 18 | End Class 19 | 20 | End Namespace 21 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ProductDetailMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class ProductDetailMm 14 | Public Property ProductId As Integer 15 | Public Property Details As String 16 | 17 | Public Overridable Property Product As ProductMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ResolutionMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class ResolutionMm 14 | Public Property ResolutionId As Integer 15 | Public Property Details As String 16 | 17 | Public Overridable Property Complaint As ComplaintMm 18 | 19 | End Class 20 | -------------------------------------------------------------------------------- /src/EntityFramework/Core/Common/EntitySql/GroupKeyAggregateInfo.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Core.Common.EntitySql 4 | { 5 | internal sealed class GroupKeyAggregateInfo : GroupAggregateInfo 6 | { 7 | internal GroupKeyAggregateInfo( 8 | GroupAggregateKind aggregateKind, ErrorContext errCtx, GroupAggregateInfo containingAggregate, ScopeRegion definingScopeRegion) 9 | : base( 10 | aggregateKind, null /* there is no AST.GroupAggregateExpression corresponding to the group key */, errCtx, 11 | containingAggregate, definingScopeRegion) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/EntityFramework/Utilities/DbProviderInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.Utilities 4 | { 5 | using System.Data.Entity.Infrastructure; 6 | 7 | internal static class DbProviderInfoExtensions 8 | { 9 | public static bool IsSqlCe(this DbProviderInfo providerInfo) 10 | { 11 | DebugCheck.NotNull(providerInfo); 12 | 13 | return !string.IsNullOrWhiteSpace(providerInfo.ProviderInvariantName) && 14 | providerInfo.ProviderInvariantName.StartsWith( 15 | "System.Data.SqlServerCe", StringComparison.OrdinalIgnoreCase); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/FunctionalTests/Objects/TransactionsModel.csdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/EntityFramework/UnitTests/TestHelpers/Fake/FakeSqlGenerator.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. 2 | 3 | namespace System.Data.Entity.ModelConfiguration.Internal.UnitTests 4 | { 5 | using System.Collections.Generic; 6 | using System.Data.Entity.Migrations.Model; 7 | using System.Data.Entity.Migrations.Sql; 8 | 9 | public class FakeSqlGenerator : MigrationSqlGenerator 10 | { 11 | public override IEnumerable Generate( 12 | IEnumerable migrationOperations, 13 | string providerManifestToken) 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/EntityFramework/VBTests/VbMonsterModel/ComputerMm.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated from a template. 4 | ' 5 | ' Manual changes to this file may cause unexpected behavior in your application. 6 | ' Manual changes to this file will be overwritten if the code is regenerated. 7 | ' 8 | '------------------------------------------------------------------------------ 9 | 10 | Imports System 11 | Imports System.Collections.Generic 12 | 13 | Partial Public Class ComputerMm 14 | Public Property ComputerId As Integer 15 | Public Property Name As String 16 | 17 | Public Overridable Property ComputerDetail As ComputerDetailMm 18 | 19 | End Class 20 | --------------------------------------------------------------------------------