sql server - How to send regular in-line SQL in entity framework -


now don't go getting huffy yet. specific situation. rather asking why ever want send in-line string sql through ef, let's try stay on topic of "how".

do need old-fashioned route using regular old ado.net or ef provide me way execute straight sql select/nonquery?

thanks in advance.

have investigated entity sql?

entity framework q&a:

string city = "london"; using (entities entities = new entities())  {   objectquery<customers> query = entities.createquery<customers>(     "select value c customers c c.address.city = @city",     new objectparameter("city", city)   );    foreach (customers c in query)     console.writeline(c.companyname); } 

since entity sql lacks dml constructs, not possible issue insert, update, or delete commands using entity sql , object services


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -