Click here to Skip to main content
15,893,722 members

Comments by Alberto Biasiutti (Top 10 by date)

Alberto Biasiutti 5-Apr-12 3:03am View    
I think that creating the correct SQL expression can get more complex in my case, because an example query can ideally go from

-search products that starts with B

to

-search products created after 1/1/2011 where category is (1, 2 or 3), and where the producer belongs to producerCategory (A B or C)

This is just a random example not really relating to my application, but I think (hope) it gives an idea. Since the filters can ideally be omitted by user input, I think that "manually" building the correct query string can become actually insidious.
Since it seems that with my solution E.F. is smart enough to execute the query only at the end, it seems like the right solution for me.
About expression trees, I read some documentation and examples and it actually seems to be rather more complex than your solution ;) thank you again
Alberto Biasiutti 4-Apr-12 3:25am View    
Wow, thank you very much for the very long answer! It seems like I could use Entity SQL to do what I want, but I think it would be quite tricky to write the correct expression based on user input.. perhaps Expression Trees is a solution more suitable to my situation. Anyway, I'll accept the solution.
Alberto Biasiutti 4-Dec-11 15:54pm View    
Thank you GK... the typo's were not the problem (I wrote the question VEEERY quickly because I was in hurry).. thank you any way, I'll post the solution my boss foundout.
Alberto Biasiutti 1-Dec-11 3:49am View    
Thank you again for answering.
I think that I'll take a quite different approach, but anyway I would like to clarify a thing (to better undertand how it works):
IF I'm not wrong, You said that the "crucial" part of "stealing" someone's identity is to access the httpContext and steal the user name. But, from what I understand, the session IS part of the httpContext (in fact, I access it via HttpContext.Current.Session["VariableName"])
Doesn't this technically put it at the same level of security (or vulnerability) of stealing the username?
Alberto Biasiutti 30-Nov-11 3:29am View    
By using the singleton pattern approach, can I mantain the values across subsequent requests? This is why I thought to use session: I can access it from wherever I want (through the static classes) and it will stay there for all the time I need, even for subsequent requests.