-
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.
Showing
79 changed files
with
3,859 additions
and
309 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
31 changes: 31 additions & 0 deletions
31
src/EFCore.Design/Scaffolding/CompiledModelCodeGenerationOptions.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,31 @@ | ||
// 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; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Scaffolding | ||
{ | ||
/// <summary> | ||
/// Represents the options to use while generating code for compiled model metadata. | ||
/// </summary> | ||
public class CompiledModelCodeGenerationOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the namespace for model metadata classes. | ||
/// </summary> | ||
/// <value> The namespace for model metadata classes. </value> | ||
public virtual string ModelNamespace { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Gets or sets the type of the corresponding DbContext. | ||
/// </summary> | ||
/// <value> The type of the corresponding DbContext. </value> | ||
public virtual Type ContextType { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Gets or sets the programming language to scaffold for. | ||
/// </summary> | ||
/// <value> The programming language to scaffold for. </value> | ||
public virtual string? Language { get; set; } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/EFCore.Design/Scaffolding/ICompiledModelCodeGenerator.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,25 @@ | ||
// 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 Microsoft.EntityFrameworkCore.Design; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
|
||
namespace Microsoft.EntityFrameworkCore.Scaffolding | ||
{ | ||
/// <summary> | ||
/// Used to generate code for compiled model metadata. | ||
/// </summary> | ||
public interface ICompiledModelCodeGenerator : ILanguageBasedService | ||
{ | ||
/// <summary> | ||
/// Generates code for compiled model metadata. | ||
/// </summary> | ||
/// <param name="model"> The source model. </param> | ||
/// <param name="options"> The options to use during generation. </param> | ||
/// <returns> The generated model metadata files. </returns> | ||
IReadOnlyCollection<ScaffoldedFile> GenerateModel( | ||
IModel model, | ||
CompiledModelCodeGenerationOptions options); | ||
} | ||
} |
Oops, something went wrong.