Amastaneh blog is a discussion site on software development, programming, algorithms, software architectures,software run-time errors and solutions from software engineers who love building great softwares.
May 19, 2012
The argument types 'Edm.Guid' and 'Edm.String' are incompatible
Error:
- The argument types 'Edm.Guid' and 'Edm.String' are incompatible for this operation. Near equals expression, line X, column Y.
- ObjectQuery<T>.Where problem with GUID
- Where filter predicate format is not match with GUID and ...
Solution:
The GUID format in where clause must be started with GUID term and covered with single quotation, like below
X.Where("it.ID = GUID'00000000-0000-0000-0000-000000000001'");
Subscribe to:
Post Comments (Atom)
2 comments:
It was a awe-inspiring post and it has a significant meaning and thanks for sharing the information.Would love to read your next post too……
Thank you for this info!
I tried to implement Generic Repository pattern with Id of type Guid. I spent a lot of time trying to do this. In NHibernate this can be done really easily. F*ck EF =\
Post a Comment