hi dear,
I am implementing a new feature and want to update the client table with a new column the dto is worked fine but at auto mapper is the problem how could i make it happen
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from 'Skoruba.IdentityServer4.Admin.BusinessLogic.Mappers.ClientExt' to 'IdentityServer4.EntityFramework.Entities.Client' Skoruba.IdentityServer4.Admin.BusinessLogic D:\Tasks\Identity\ID#TEST\identityservercore\Admin\src\Skoruba.IdentityServer4.Admin.BusinessLogic\Services\ClientService.cs 153 Active
<log goes here>
Hi, if you name the same your new property/column in both dto and entity then, the mapper should not be a problem.
What you have to do is to create a new Client class that inherits from Client class. eg.: public class ExtendedClient: Client
migrationBuilder.AddColumn<string>(
name: "Discriminator",
table: "Clients",
nullable: false,
defaultValue: "ExtendedClient");
Pretty much these were the changes we've done to extended the client definition with new properties.
@mitirazvan thanx for your answer i really appreciate it. but now i got this
`MySqlException: Unknown column 'x.Discriminator' in 'field list'
MySqlConnector.Core.ServerSession.TryAsyncContinuation(Task
Did you applied the migration on the database?
Is the Discriminator and the new property part of the table definition in SQL server?
If not, you have to apply the migration. To do that you have 2 possibilities:
Hope this would solve your issue.
things work now thanx @mitirazvan
Most helpful comment
Did you applied the migration on the database?
Is the Discriminator and the new property part of the table definition in SQL server?
If not, you have to apply the migration. To do that you have 2 possibilities:
Hope this would solve your issue.