Click here to Skip to main content
15,906,626 members
Home / Discussions / C#
   

C#

 
AnswerRe: architecture MVC Pin
Pete O'Hanlon2-Mar-12 3:24
mvePete O'Hanlon2-Mar-12 3:24 
GeneralRe: architecture MVC Pin
MemberDotNetting2-Mar-12 3:41
MemberDotNetting2-Mar-12 3:41 
QuestionDataTable and DataSet? Pin
murali_utr1-Mar-12 17:32
murali_utr1-Mar-12 17:32 
SuggestionRe: DataTable and DataSet? Pin
V.1-Mar-12 20:33
professionalV.1-Mar-12 20:33 
AnswerRe: DataTable and DataSet? Pin
V.1-Mar-12 20:41
professionalV.1-Mar-12 20:41 
AnswerRe: DataTable and DataSet? Pin
satalaj2-Mar-12 5:18
satalaj2-Mar-12 5:18 
AnswerRe: DataTable and DataSet? Pin
Rahul Rajat Singh3-Mar-12 0:43
professionalRahul Rajat Singh3-Mar-12 0:43 
QuestionHow to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen1-Mar-12 12:28
gshen1-Mar-12 12:28 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
Dave Kreskowiak1-Mar-12 13:03
mveDave Kreskowiak1-Mar-12 13:03 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen1-Mar-12 13:08
gshen1-Mar-12 13:08 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
Dave Kreskowiak1-Mar-12 13:43
mveDave Kreskowiak1-Mar-12 13:43 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
PIEBALDconsult1-Mar-12 13:24
mvePIEBALDconsult1-Mar-12 13:24 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen2-Mar-12 6:01
gshen2-Mar-12 6:01 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
Peter_in_27801-Mar-12 13:43
professionalPeter_in_27801-Mar-12 13:43 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen2-Mar-12 6:07
gshen2-Mar-12 6:07 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
Bernhard Hiller1-Mar-12 20:38
Bernhard Hiller1-Mar-12 20:38 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen2-Mar-12 6:09
gshen2-Mar-12 6:09 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
BobJanova1-Mar-12 23:28
BobJanova1-Mar-12 23:28 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen2-Mar-12 6:11
gshen2-Mar-12 6:11 
AnswerRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
#realJSOP2-Mar-12 4:21
professional#realJSOP2-Mar-12 4:21 
GeneralRe: How to know application exit in Console started by Process.Start("cmd.exe")) Pin
gshen2-Mar-12 6:15
gshen2-Mar-12 6:15 
QuestionIQueryable or IEnumerable as returns from Repositories Pin
Ciumac Sergiu1-Mar-12 10:57
Ciumac Sergiu1-Mar-12 10:57 
Hi all,
Repository[^] pattern with Unit of Work[^] and Dependency Injection, seem to be a universaly accepted solution for ASP.NET + EF applications. There are still some minor questions that I would like to ask here.
Consider the following method from a generic IRepository interface:
C#
public IQueryable<T> Get<T>() where T : class
{
    return Set<T>();
}


I wonder, is it a good practice in reveling IQueryable interface to the callers. This means that the calling method can add filters/paggin/sorting, but at the same time the repository itself becomes not unit testable (you cant rely anymore on what the repository will actually return). The caller can even add a non-translatable predicate that will break at runtime. So, is it a good practice in hiding IQueryable interface from the caller, and defining IEnumerable interface instead?

Also, I wonder how do you perform integration tests on repositories? Do you use SQL CE4, full SQL Server, or just Fake objects on DbContext?

Appreciate your response,
With regards

modified 1-Mar-12 17:45pm.

GeneralRe: IQueryable or IEnumerable as returns from Repositories Pin
PIEBALDconsult1-Mar-12 11:42
mvePIEBALDconsult1-Mar-12 11:42 
QuestionIs it possible to battery status of Digital camera using c# and WIA? Pin
Icarii1-Mar-12 4:15
Icarii1-Mar-12 4:15 
AnswerRe: Is it possible to battery status of Digital camera using c# and WIA? Pin
Dave Kreskowiak1-Mar-12 9:00
mveDave Kreskowiak1-Mar-12 9:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.