public void SqlQueryEntityFactory() { var session = new DataSession("Tracker").Log(Console.WriteLine); session.Log(Console.WriteLine); session.Should().NotBeNull(); string email = "*****@*****.**"; string sql = "select * from [User] where EmailAddress like @EmailAddress"; var users = session.Sql(sql) .Parameter("@EmailAddress", email) .Query <User>(); users.Should().NotBeNull(); users.Should().NotBeEmpty(); }
public void SqlQueryEntityFactory() { var session = new DataSession("Tracker").Log(Console.WriteLine); session.Log(Console.WriteLine); session.Should().NotBeNull(); string email = "*****@*****.**"; string sql = "select * from [User] where EmailAddress like @EmailAddress"; var users = session.Sql(sql) .Parameter("@EmailAddress", email) .Query<User>(); users.Should().NotBeNull(); users.Should().NotBeEmpty(); }