listObjectFullTypeName wip

This commit is contained in:
Wvader 2023-01-03 15:27:30 +00:00
parent f24705ff95
commit e5350b2ae8
2 changed files with 9 additions and 1 deletions

View File

@ -514,6 +514,8 @@ namespace BlueWest.EfMethods
var keyFullTypeName = keyMemberType.Value.Type.ToDisplayString(); var keyFullTypeName = keyMemberType.Value.Type.ToDisplayString();
#pragma warning restore CS8629 #pragma warning restore CS8629
var listObjectFullTypeName = "";
// Try grabbing string literal if there's no nameof in it // Try grabbing string literal if there's no nameof in it
if (keyPropertyName == string.Empty) if (keyPropertyName == string.Empty)
@ -535,7 +537,7 @@ namespace BlueWest.EfMethods
returnTypeFullName = efTypeofSymbols[0].ToDisplayString(); returnTypeFullName = efTypeofSymbols[0].ToDisplayString();
} }
return new EfGetListModel(entityDataModel, listPropertyName, keyPropertyName, keyFullTypeName, returnTypeIdentifierName, returnTypeFullName); return new EfGetListModel(entityDataModel, listPropertyName, listObjectFullTypeName,keyPropertyName, keyFullTypeName, returnTypeIdentifierName, returnTypeFullName);
} }
private EfAddToListModel ExtractEfAddToListMethodsModel(MemberDeclarationSyntax uProperty, SemanticModel semanticModel, EfEntityDataModel entityDataModel) private EfAddToListModel ExtractEfAddToListMethodsModel(MemberDeclarationSyntax uProperty, SemanticModel semanticModel, EfEntityDataModel entityDataModel)

View File

@ -156,6 +156,10 @@ namespace BlueWest.EfMethods
internal class EfGetListModel : EfEntityDataModel internal class EfGetListModel : EfEntityDataModel
{ {
public string ListPropertyName { get; set; } public string ListPropertyName { get; set; }
public string ListObjectFullTypeName { get; set; }
public string KeyPropertyName { get; set; } public string KeyPropertyName { get; set; }
public string KeyFullTypeName { get; set; } public string KeyFullTypeName { get; set; }
public string ReturnTypeIdentifierName { get; set; } public string ReturnTypeIdentifierName { get; set; }
@ -165,6 +169,7 @@ namespace BlueWest.EfMethods
public EfGetListModel( public EfGetListModel(
EfEntityDataModel entity, EfEntityDataModel entity,
string listPropertyName, string listPropertyName,
string listObjectFullTypeName,
string keyPropertyName, string keyPropertyName,
string keyFullTypeName, string keyFullTypeName,
string returnTypeIdentifierName, string returnTypeIdentifierName,
@ -172,6 +177,7 @@ namespace BlueWest.EfMethods
: base(entity.PropertyName, entity.EntityTypeFullName, entity.EntityTypeIdentifierName) : base(entity.PropertyName, entity.EntityTypeFullName, entity.EntityTypeIdentifierName)
{ {
ListPropertyName = listPropertyName; ListPropertyName = listPropertyName;
ListObjectFullTypeName = listObjectFullTypeName;
KeyPropertyName = keyPropertyName; KeyPropertyName = keyPropertyName;
KeyFullTypeName = keyFullTypeName; KeyFullTypeName = keyFullTypeName;
ReturnTypeIdentifierName = returnTypeIdentifierName; ReturnTypeIdentifierName = returnTypeIdentifierName;