实体框架查询条件与条件和两者之间的区别
代码1
我在查询中使用了两个where where条件
dbContext.Projects.Where(p=>p.ProjectId!=ProjectId).Where(p=>p.Name==Name) .SingleOrDefault();
代码2
我用过&&条件不使用两个条件
dbContext.Projects.Where(p=>p.ProjectId!=ProjectId && p.Name==Name).SingleOrDefault();
> code1和code2有什么区别????
The both queries are return same value. but i don’t know the differences. Please explain to me,which one is better. and why?