I am having Asp.Net 3.1 application, and I am getting error After updating my nuget packages 'Microsoft.EntityFrameworkCore' in below line as
'The specified field '_redirectUris' cannot be used for the property 'ClientApplication.RedirectUrisList' because it does not match the property name.'
From the related github issue , it seems that this method still has problems in 3.0 and is not applicable
Here is workaround to make modification as follows:
Model
public class TestApplication
{
private string _redirectUris;
public int Id { get; set; }
public string Name { get; set; }
public string RedirectUrisList => _redirectUris;
}
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
System.InvalidOperationException: 'The specified field '_redirectUris' of type 'string' cannot be used for the property 'ClientApplication.RedirectUris' of type 'IEnumerable<string>'. Only backing fields of types that are assignable from the property type
can be used.'
public IEnumerable<string> RedirectUris
{
get => EnumerationToStringConverter.CreateEnumerationFromString(_redirectUris);
set => _redirectUris = EnumerationToStringConverter.CreateStringFromEnumeration(value, _redirectUris);
}
Sql does not support a column as an array type, so there is no way to map a database field to a enumerator. It looks you really wanted to map to a enum, which can be done
Member
10 Points
38 Posts
ASP.Net 3.1 : Error after updating Nuget Package
Apr 21, 2020 08:19 PM|TechAspirant|LINK
I am having Asp.Net 3.1 application, and I am getting error After updating my nuget packages 'Microsoft.EntityFrameworkCore' in below line as
'The specified field '_redirectUris' cannot be used for the property 'ClientApplication.RedirectUrisList' because it does not match the property name.'
Contributor
2070 Points
606 Posts
Re: ASP.Net 3.1 : Error after updating Nuget Package
Apr 22, 2020 06:22 AM|Sherry Chen|LINK
Hi TechAspirant ,
From the related github issue , it seems that this method still has problems in 3.0 and is not applicable
Here is workaround to make modification as follows:
Model
DbContext
Best Regards,
Sherry
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
10 Points
38 Posts
Re: ASP.Net 3.1 : Error after updating Nuget Package
Apr 22, 2020 04:57 PM|TechAspirant|LINK
I am getting error as below
System.InvalidOperationException: 'The specified field '_redirectUris' of type 'string' cannot be used for the property 'ClientApplication.RedirectUris' of type 'IEnumerable<string>'. Only backing fields of types that are assignable from the property type can be used.'
All-Star
58174 Points
15647 Posts
Re: ASP.Net 3.1 : Error after updating Nuget Package
Apr 22, 2020 07:39 PM|bruce (sqlwork.com)|LINK
Sql does not support a column as an array type, so there is no way to map a database field to a enumerator. It looks you really wanted to map to a enum, which can be done
https://docs.microsoft.com/en-us/ef/core/modeling/value-conversions