LINQ: dot notation equivalent for JOIN

Like this: List<Person> pr = db.Persons .Join(db.PersonExceptions, p => p.ID, e => e.PersonID, (p, e) => new { p, e }) .Where(z => z.e.CreatedOn >= fromDate) .OrderByDescending(z => z.e.CreatedOn) .Select(z => z.p) .ToList(); Note how a new anonymous type is introduced to carry both the p and e bits forward. In the specification, query operators … Read more

Extension methods syntax vs query syntax

Honestly, sometimes it can be situational once you start using Funcs and Actions. Say you are using these three funcs: Func<DataClasses.User, String> userName = user => user.UserName; Func<DataClasses.User, Boolean> userIDOverTen = user => user.UserID < 10; Func<DataClasses.User, Boolean> userIDUnderTen = user => user.UserID > 10; As you can see the first one replaces the lamdba … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)