diff --git a/src/BlueWest.EfMethods/EfMethodsSource/EfGetOneWithTemplateSource.cs b/src/BlueWest.EfMethods/EfMethodsSource/EfGetOneWithTemplateSource.cs index 3d57575..e3ab629 100644 --- a/src/BlueWest.EfMethods/EfMethodsSource/EfGetOneWithTemplateSource.cs +++ b/src/BlueWest.EfMethods/EfMethodsSource/EfGetOneWithTemplateSource.cs @@ -57,7 +57,7 @@ namespace BlueWest.EfMethods { var returnTypeFullName = model.ReturnTypeFullName; var entityTypeName = model.EntityTypeIdentifierName; - + var entityFullTypeName = model.EntityTypeFullName; var contextFullName = methodsModel.ContextFullType; var findEntityVarName = model.EntityTypeIdentifierName.ToCamelCase(); var propertyName = model.PropertyName; @@ -67,6 +67,8 @@ namespace BlueWest.EfMethods var templateToSourceBuilder = new StringBuilder(addSourceTemplate); templateToSourceBuilder .Replace("{returnTypeFullName}", returnTypeFullName) + .Replace("{entityFullTypeName}", entityFullTypeName) + .Replace("{entityTypeName}", entityTypeName) .Replace("{contextFullName}", contextFullName) .Replace("{contextFullName}", contextFullName) diff --git a/src/BlueWest.EfMethods/Models.cs b/src/BlueWest.EfMethods/Models.cs index 86100e7..da0fb60 100644 --- a/src/BlueWest.EfMethods/Models.cs +++ b/src/BlueWest.EfMethods/Models.cs @@ -117,6 +117,11 @@ namespace BlueWest.EfMethods { public string ReturnTypeIdentifierName { get; set; } public string ReturnTypeFullName { get; set; } + + public string MainTypeIdentifierName { get; set; } + public string MainTypeFullName { get; set; } + + public EfGetManyModel(EfEntityDataModel entity, string returnTypeFullName, string returnTypeIdentifierName) : base(entity.PropertyName, entity.EntityTypeFullName, entity.EntityTypeIdentifierName)