public void Test1() { var SqLite = new SqliteConnection("Filename=:memory:"); var DBOptions = new DbContextOptionsBuilder <DBContextClass>().UseSqlite(SqLite).Options; SqLite.Open(); using (var db = new DBContextClass(DBOptions)) { db.Database.Migrate(); var clients = new Client(); clients.FName = "John"; clients.LName = "Smith"; clients.UserName = "******"; clients.Password = "******"; db.Add(clients); db.SaveChanges(); } using (var db = new DBContextClass(DBOptions)) { var clients = db.Clients .Where(b => b.FName == "John") .OrderBy(b => b.ClientID) .ToList() .First(); Assert.Equal("John", clients.FName); } }