256 reputation
24
bio website blog.hackedbrain.com
location Seattle, WA
age 37
visits member for 4 years, 3 months
seen Sep 6 '13 at 22:18

Chief Software Architect
Mimeo.com, Inc.

Twitter - @drub0y
Linked-In - http://www.linkedin.com/pub/drew-marsh/4b/217/953


Jan
21
comment Is it better to create a stored procedure or entities to get to the data I need?
Yes, I agree, it completely depends on the "weight" of the entities involved. If you're just avoiding a few moderately sized columns coming back then it is probably not worth the optimization. As always the only way to really know the answer is to performance test your scenarios.
Jan
21
comment Is it better to create a stored procedure or entities to get to the data I need?
I should add that an alternative is to do projection of exactly which fields you want into an anonymous type with an EF query that would be much better than simply .Include()'ing everything blindly, but then you give up the fidelity of types (at least at the entity layer). You can still provide a domain object at a business/repository level of course with this technique. That said it's still more complex and costly than creating a specific entity over a view (EDMX or DB).
Jan
21
comment Is it better to create a stored procedure or entities to get to the data I need?
Well, I guess we disagree then. What you're suggesting with .Include will result in pulling back all fields for both entities when, in this kind of context, you probably only want N fields from Table A and N fields from Table B. If your concern is "maintaining views" and you think that this is too much work at the DB level then that's why there is a tradeoff to define the view totally inside the storage model of the EDMX itself. That way you can still completely control exactly which fields you want to come back for that specific entity, but not have to involve a DBA for maintenance.
Jan
20
comment Versioned Resources to Improve Cacheability
Yeah, I think I'm just not completely grasping your entire API interaction, but I do think the solution is wise. End game, if I'm at least grasping your main goal, you're reducing N GET -> 304 Not Modified requests down to a single GET -> 200 with this approach.
Jan
18
comment How do you debug without an IDE?
You're right, by itself it does not answer the question. I felt that @jimwise's answer was a good answer to the question, but didn't include any information on where to find a command line debugger for Windows. So I figured I'd tack on an additional answer for those that come across this and are wondering how to do it on Windows. I will update my answer to say as much.