This commit is contained in:
CodeLiturgy 2022-08-28 18:00:09 +01:00
parent 6540959778
commit 13627dbcb6
4 changed files with 9 additions and 22 deletions

View File

@ -18,8 +18,7 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AdditionalFiles Include=".\Extensions\AddToEntityTemplate.csx" /> <AdditionalFiles Include=".\Context\Templates\AddToEntityTemplate.csx" />
<AdditionalFiles Include="Context\Templates\AddToEntityTemplate.csx" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,10 +0,0 @@
namespace BlueWest.WebApi.Context;
public class AttributeNavigation<T>
{
object HasForeignKey<TDependentEntity>(
Expression<Func<TDependentEntity, object?>> foreignKeyExpression)
{
}
}

View File

@ -1,5 +1,4 @@
public static partial class {entityTypeName}Extensions {
public static (bool, {readTypeFullName}) Add{entityTypeName}( public static (bool, {readTypeFullName}) Add{entityTypeName}(
this {contextFullName} dbContext, {createTypeFullName} {toCreateVarName}) { this {contextFullName} dbContext, {createTypeFullName} {toCreateVarName}) {
var {newEntityVarName} = new {entityTypeFullName}({toCreateVarName}); var {newEntityVarName} = new {entityTypeFullName}({toCreateVarName});
@ -7,4 +6,3 @@ public static partial class {entityTypeName}Extensions {
var success = dbContext.SaveChanges() >= 0; var success = dbContext.SaveChanges() >= 0;
return (success, new {readTypeFullName}({newEntityVarName})); return (success, new {readTypeFullName}({newEntityVarName}));
} }
}

@ -1 +1 @@
Subproject commit 4d9cc4b029b15049b5d9a8bb8e87f6d9a513b712 Subproject commit 12d5839f1660c0cf89be22d391b1f744a37c202e