Click here to Skip to main content
15,895,370 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Helo folks!

I have some trouble to get this to work :


Explanation

database table have

Column: COOKIE
Values : selected: test1, test2 ,test3, selected1:pointer, socket ,burner ,EFE, stolen



Now i need to retrieve a string part "EFE" with LINQ to Entities ... i tryed on this way :


ContextEntitie db = new ContextEntitie()


List"<"string">" cookieToDelete = new List"<"string">"(); <-------- here i have allreayd "EFE" string..

public string cookieToWanish;

foreach(string cookie in cookieToDelete)
{

cookieToWanish = cookie;



var deleteCookie = db.Users.Single(co => co.COOKIE.Contains(cookieToWanish);
db.UserPreference.DeleteObject(deleteCookie);


}
db.SaveChanges();


The problem is that nothing happens i cant delete that par of string ..
please help!


Best Regards !

Xeptz
Posted
Updated 8-Aug-13 18:17pm
v2
Comments
Alexander Dymshyts 9-Aug-13 4:51am    
Can you post your code part like a code, and not like a text?
virusstorm 9-Aug-13 10:02am    
Can you post what your table data looks like a little better? Can you show the rows and columns in a table layout?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900