Inside SQL, I have a table with a primary key as binary (8). When I add this table to my model with Update Model from Database, I see that this column is of type =Binary

and in C # I get this column as byte[].
Is it possible to map this column to int?
I know that I can create a view with CASTin SQL:
SELECT
Client_Id,
CAST(Client_Id AS INT) AS NewClient_Id,
*
FROM
dbo.Clients
but this is not a solution, because I must be able to write, and not just read from this table. I know that I can create a stored procedure for inserts, but I would like to avoid this.
I am using EntityFramewor 6.1.3.
source
share