-
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 view support to the relational model API
Use the new model in the query pipeline Fixes #12846
- Loading branch information
1 parent
1a5c4fb
commit 8ea444b
Showing
41 changed files
with
1,475 additions
and
279 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
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,34 @@ | ||
// 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; | ||
using JetBrains.Annotations; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Metadata | ||
{ | ||
/// <summary> | ||
/// Represents a view in the database. | ||
/// </summary> | ||
public interface IView : ITableBase | ||
{ | ||
/// <summary> | ||
/// The entity type mappings. | ||
/// </summary> | ||
new IEnumerable<IViewMapping> EntityTypeMappings { get; } | ||
|
||
/// <summary> | ||
/// The columns defined for this view. | ||
/// </summary> | ||
new IEnumerable<IViewColumn> Columns { get; } | ||
|
||
/// <summary> | ||
/// Returns the column with a given name. Returns <c>null</c> if no column with the given name is defined. | ||
/// </summary> | ||
new IViewColumn FindColumn([NotNull] string name); | ||
|
||
/// <summary> | ||
/// The view definition or <c>null</c> if this view is not managed by migrations. | ||
/// </summary> | ||
public string ViewDefinition { 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,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 view. | ||
/// </summary> | ||
public interface IViewColumn : IColumnBase | ||
{ | ||
/// <summary> | ||
/// The containing view. | ||
/// </summary> | ||
IView View { get; } | ||
|
||
/// <summary> | ||
/// The property mappings. | ||
/// </summary> | ||
new IEnumerable<IViewColumnMapping> PropertyMappings { get; } | ||
} | ||
} |
Oops, something went wrong.