I'm writing an Entity Framework LINQ query in which I want to parse a string into a UNIQUEIDENTIFIER (aka GUID) as part of the ...WHERE... clause:...public IEnumerable<User> Find(Guid guid)
{
return dbContext
.Users
.Where(user => Guid...
I am having problems with my MSSQL database design....I had 2 tables that looked like this:...CREATE TABLE tenants
(
tenantId INT PRIMARY KEY,
tenantName VARCHAR
)
CREATE TABLE users
(
userId INT PRIMARY KEY,
userName VARCHAR,
tenan...
Got an error..."Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"...The GUID input is "68f0eaed-189e-4c65-8cf8-475539d6f21b"... context.Countries.AddRange(GetCountryData(Path.Combine(AppDomain.CurrentDomain.BaseDirecto...
If I have a model with a key of type ...Guid..., is it bad practise to set the ID explicitly in the constructor?...I know it will be set implicitly by Entity Framework, but will anything bad happen (perhaps performance wise) from setting it explicitly?...