I am creating a WPF app using C #, Entity Framework and SQL Server 2008 R2 I am trying to
select convert (nvarchar (10), bk.BookingDate, 103) date, calculation (*) '2014-10-01' and '2014 -10-31 'and BK This query works by ISDiated = 0 Group Convert (Navratra (10), BK., Bookingdate, 103) between order conversion (date, BK, bookingdate) 1
The server is removed at the prompt and receives the result. However, when I am using an entity framework, I'm getting the NULL
value.
var value = reference.Database.SqlQuery & lt; KeyValuePair & lt; String, int & gt; & Gt; (Query) .Ollist and lieutenant; Keywalker & lt; String, Int & G; & Gt; ();
- < Li> Is this because I am using a key value pair in the method call?
- Is this an option to use the unit framework?
- Should I use the old style database connection and command to run this style?
I think this is because you KeyValuePair
public class MyResult {public DateTime date {received; Set; } Public int TotalCount {get; Set; }}
and add counts (*) as the total count
in your query. And use it as a normal type parameter for your SqlQuery
call One important thing to remember is that in the name of EF result the members will appear with the names match Columns were returned from the query. For example, if your query returns a column named "total_count", then you will need a category called "total_count" (with underscore).
Comments
Post a Comment