public async void ToListAsyncReturnsCorrectResults() { var memory = DataAssert.Data.Memory <WebUser>().Where(w => w.Id > 80).OrderBy(w => w.Id).ToList(); var elastic = await DataAssert.Data.Elastic <WebUser>().Where(w => w.Id > 80).OrderBy(w => w.Id).ToListAsync(); DataAssert.SameSequence(memory, elastic); }
public void ProjectWithObjectInitializerAndContructorArgs() { DataAssert.Same <WebUser>(q => q.Select(x => new WebUser(x.PasswordHash) { Surname = x.Email })); }
public void OrderByStringDescendingThenByDateTimeDescending() { DataAssert.Same <WebUser>(q => q.OrderByDescending(w => w.Username).ThenByDescending(w => w.Joined)); }
public void OrderByDateTimeDescending() { DataAssert.Same <WebUser>(q => q.OrderByDescending(w => w.Joined)); }
public void OrderByStringDescending() { DataAssert.Same <WebUser>(q => q.OrderByDescending(w => w.Username)); }
public void OrderByIntDescending() { DataAssert.Same <WebUser>(q => q.OrderByDescending(w => w.Id)); }
public void OrderByDateTime() { DataAssert.Same <WebUser>(q => q.OrderBy(w => w.Joined)); }
public void OrderByInt() { DataAssert.Same <WebUser>(q => q.OrderBy(w => w.Id)); }
public void GroupByDateTime() { DataAssert.Same((IQueryable <WebUser> q) => q.GroupBy(w => w.Joined).Select(g => KeyValuePair.Create(g.Key, g.Count())), true); }
public void ProjectWithContructorArgsAndNoObjectInitializer() { DataAssert.Same <WebUser>(q => q.Select(x => new WebUser(x.Username))); }
public void ProjectWithObjectInitializerAndNoContructorArgs() { DataAssert.Same <WebUser>(q => q.Select(x => new WebUser { Id = x.Id, Email = x.Forename })); }
public void OrderByStringThenByDateTime() { DataAssert.Same <WebUser>(q => q.OrderBy(w => w.Forename).ThenBy(w => w.Joined)); }