-
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.
- Loading branch information
1 parent
812e241
commit 4c63114
Showing
50 changed files
with
1,812 additions
and
503 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
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
17 changes: 17 additions & 0 deletions
17
src/EFCore.Relational/Metadata/Conventions/RelationalModelConvention.cs
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,17 @@ | ||
// 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 Microsoft.EntityFrameworkCore.Metadata.Internal; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata.Conventions | ||
{ | ||
/// <summary> | ||
/// A convention that precomputes a relational model. | ||
/// </summary> | ||
public class RelationalModelConvention : IModelFinalizedConvention | ||
{ | ||
/// <inheritdoc /> | ||
public virtual IModel ProcessModelFinalized(IModel model) | ||
=> model is IConventionModel conventionModel ? RelationalModel.AddRelationalModel(conventionModel) : model; | ||
} | ||
} |
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,23 @@ | ||
// 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.Collections.Generic; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata | ||
{ | ||
/// <summary> | ||
/// Represents a column in a table. | ||
/// </summary> | ||
public interface IColumn : IColumnBase | ||
{ | ||
/// <summary> | ||
/// The containing table. | ||
/// </summary> | ||
new ITable Table { get; } | ||
|
||
/// <summary> | ||
/// The property mappings. | ||
/// </summary> | ||
new IEnumerable<IColumnMapping> PropertyMappings { get; } | ||
} | ||
} |
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,40 @@ | ||
// 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.Collections; | ||
using System.Collections.Generic; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata | ||
{ | ||
/// <summary> | ||
/// Represents a column-like object in a table-like object. | ||
/// </summary> | ||
public interface IColumnBase : IAnnotatable | ||
{ | ||
/// <summary> | ||
/// The column name. | ||
/// </summary> | ||
string Name { get; } | ||
|
||
/// <summary> | ||
/// The column type. | ||
/// </summary> | ||
string Type { get; } | ||
|
||
/// <summary> | ||
/// Whether the column can contain NULL. | ||
/// </summary> | ||
bool IsNullable { get; } | ||
|
||
/// <summary> | ||
/// The containing table-like object. | ||
/// </summary> | ||
ITableBase Table { get; } | ||
|
||
/// <summary> | ||
/// The property mappings. | ||
/// </summary> | ||
IEnumerable<IColumnMappingBase> PropertyMappings { get; } | ||
} | ||
} |
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,21 @@ | ||
// 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. | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata | ||
{ | ||
/// <summary> | ||
/// Represents property mapping to a column. | ||
/// </summary> | ||
public interface IColumnMapping : IColumnMappingBase | ||
{ | ||
/// <summary> | ||
/// The target column. | ||
/// </summary> | ||
new IColumn Column { get; } | ||
|
||
/// <summary> | ||
/// The containing table mapping. | ||
/// </summary> | ||
new ITableMapping TableMapping { get; } | ||
} | ||
} |
Oops, something went wrong.