-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: change DbContext to have injectable Model Creator (#423)
* remove default ctor dbcontext * constrain dbcontext options ctor * add base OnModelCreating invoke * add injectable db model creation * Update KeyedModelInterfaceGeneratorProcessor.cs * add created, modified, rowversion to ef model * correct typo in datetimeoffset * add initial logic for ms sql model creator * update sonar token arg * fix generation around interface implementation * add unit test * fix namespacing of dbcontext
- Loading branch information
Showing
11 changed files
with
482 additions
and
107 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
20 changes: 20 additions & 0 deletions
20
...cleotide.Generators/Features/EntityFramework/EntityFrameworkMsSqlModelCreatorGenerator.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,20 @@ | ||
// Copyright (c) 2020 DHGMS Solutions and Contributors. All rights reserved. | ||
// DHGMS Solutions and Contributors licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for full license information. | ||
|
||
using Dhgms.Nucleotide.Generators.Generators; | ||
|
||
namespace Dhgms.Nucleotide.Generators.Features.EntityFramework | ||
{ | ||
/// <summary> | ||
/// Code Generator for Entity Framework Injectable Model Creator. | ||
/// </summary> | ||
public abstract class EntityFrameworkMsSqlModelCreatorGenerator : BaseGenerator<EntityFrameworkDbContextFeatureFlags, EntityFrameworkMsSqlModelCreatorGeneratorProcessor, EntityFrameworkDbContextGenerationModel> | ||
{ | ||
///<inheritdoc /> | ||
protected override string GetNamespace() | ||
{ | ||
return "ModelCreation"; | ||
} | ||
} | ||
} |
Oops, something went wrong.