Skip to content

Why enforce type constraint at the class level? #26

@mikebeaton

Description

@mikebeaton

Issue raised on medium.com:

Hi Mike, Looks like a promising Micro-Orm and I’ll be sure to try it, but may I ask why you enforce a type constraint at the class level rather than allowing people pass in the return type as an parameter?

Query result objects are quite often specific to the query or stored proc, and having to inject an instance of MightyOrm class each query return type seems a bit laborious.

It was something I never understood about Dapper.MicroOrm.Repositories either, given that under the hood all methods are invoking a protected method with the class type argument.

If there is a good reason, might I suggest allowing people to optionally override the result type my passing the method a type argument?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions