natural born programmer
Blog Archive
►
2020
(4)
►
February
(4)
►
2019
(1)
►
June
(1)
►
2015
(15)
►
March
(2)
►
February
(2)
►
January
(11)
►
2012
(4)
►
July
(2)
►
February
(2)
▼
2011
(11)
►
December
(1)
▼
October
(2)
in queries from sql to linq
sql error in changing a db structure and saving again
►
September
(1)
►
July
(7)
►
2010
(2)
►
March
(2)
►
2009
(3)
►
December
(3)
►
2008
(3)
►
November
(1)
►
August
(1)
►
June
(1)
About Me
PD
View my complete profile
Thursday, October 27, 2011
in queries from sql to linq
try this:
List
Ids = new List
;
Ids.Add(1);
Ids.Add(2);
Ids.Add(3);
var t = from n in productList
where Ids.Contains(n.Id)
select n;
this is like:
select * from productList where Id in (1, 2, 3)
Tuesday, October 4, 2011
sql error in changing a db structure and saving again
Sometimes, we encounter sql error in changing a db structure and saving again.
The solution is:
Go to Tools -> Options of your SQL Management Studio.
Then, in the Designers -> Tables and Database Designers, uncheck the:
"Prevent saving changes that require table re-creation"
That it! Simple way, but mind boggling.
Thanks for reading!
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)