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?
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
Post a Comment