You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have simple table in MS SQL containing 2 columns:
ClientId - binary(8) primary key
ClientName - varchar(30)
When I add that table to my model I can see that ClientId type = Binary
What I would like to do is to override that type so that inside C# code I will be able to use int instead of byte[].
SELECT * FROM Clients WHERE ClientId = 0x0000000000000001 and SELECT * FROM Clients WHERE ClientId = 1 are giving me same results so why not allow to specify target mapping.
This would only require simple CAST inside SQL and just for select operation, all other work fine.
I'm aware I can use stored procedures for select and updates or even use SQL view. But sometimes for very simple applications this would be big convenience.
It's easier to say client with Id = 4067 than client with Id =0x0000000000000FE3
Can this be done?
The text was updated successfully, but these errors were encountered:
i have simple table in MS SQL containing 2 columns:
ClientId - binary(8) primary key
ClientName - varchar(30)
When I add that table to my model I can see that
ClientId
type =Binary
What I would like to do is to override that type so that inside C# code I will be able to use int instead of byte[].
SELECT * FROM Clients WHERE ClientId = 0x0000000000000001
andSELECT * FROM Clients WHERE ClientId = 1
are giving me same results so why not allow to specify target mapping.This would only require simple CAST inside SQL and just for select operation, all other work fine.
I'm aware I can use stored procedures for select and updates or even use SQL view. But sometimes for very simple applications this would be big convenience.
It's easier to say
client with Id = 4067
thanclient with Id =0x0000000000000FE3
Can this be done?
The text was updated successfully, but these errors were encountered: