Skip to content

thomaseyde/typed-query-spike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typed-query-spike

Using generics to locate and execute queries.

[Subject("Query")]
public class Querying_customer_via_api
{
    Establish context = () =>
        {
            identified = Query<Customer>.One(new ByCustomerId());
            named = Query<Customer>.Many(new ByCustomerName());
            persons = Query<Person>.Many(new ByCustomerId());
        };

    It should_get_by_id = () => identified.ShouldNotBeNull();
    It should_get_by_name = () => named.ShouldNotBeEmpty();
    It should_get_persons = () => persons.ShouldNotBeEmpty();

    static Customer identified;
    static IEnumerable<Customer> named;
    static IEnumerable<Person> persons;
}

About

Using generics to locate and execute queries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages