-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Microsoft.EntityFrameworkCore.Attributes assembly
Change owned entity type configuration API. Part of #9487
- Loading branch information
1 parent
6d7e51c
commit f94f7a1
Showing
21 changed files
with
142 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>Provides attributes that are used to configure Entity Framework Core | ||
</Description> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<MinClientVersion>3.6</MinClientVersion> | ||
<AssemblyName>Microsoft.EntityFrameworkCore.Attributes</AssemblyName> | ||
<RootNamespace>Microsoft.EntityFrameworkCore</RootNamespace> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<CodeAnalysisRuleSet>..\EFCore.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace Microsoft.EntityFrameworkCore | ||
{ | ||
/// <summary> | ||
/// Marks a type as owned. All references to this type will be configured as owned entity types. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
public class OwnedAttribute : Attribute | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.ComponentModel; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata.Builders | ||
{ | ||
/// <summary> | ||
/// <para> | ||
/// Instances of this class are returned from methods when using the <see cref="ModelBuilder" /> API | ||
/// and it is not designed to be directly constructed in your application code. | ||
/// </para> | ||
/// </summary> | ||
public class OwnedEntityTypeBuilder | ||
{ | ||
#region Hidden System.Object members | ||
|
||
/// <summary> | ||
/// Returns a string that represents the current object. | ||
/// </summary> | ||
/// <returns> A string that represents the current object. </returns> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public override string ToString() => base.ToString(); | ||
|
||
/// <summary> | ||
/// Determines whether the specified object is equal to the current object. | ||
/// </summary> | ||
/// <param name="obj"> The object to compare with the current object. </param> | ||
/// <returns> true if the specified object is equal to the current object; otherwise, false. </returns> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public override bool Equals(object obj) => base.Equals(obj); | ||
|
||
/// <summary> | ||
/// Serves as the default hash function. | ||
/// </summary> | ||
/// <returns> A hash code for the current object. </returns> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public override int GetHashCode() => base.GetHashCode(); | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Microsoft.EntityFrameworkCore.Metadata.Builders | ||
{ | ||
/// <summary> | ||
/// <para> | ||
/// Instances of this class are returned from methods when using the <see cref="ModelBuilder" /> API | ||
/// and it is not designed to be directly constructed in your application code. | ||
/// </para> | ||
/// </summary> | ||
/// <typeparam name="T"> The entity type being configured. </typeparam> | ||
// ReSharper disable once UnusedTypeParameter | ||
public class OwnedEntityTypeBuilder<T> : OwnedEntityTypeBuilder | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters