You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was told it's easier to inject and unit test that way.
And speaking of interface, are you familiar with Insight.Database's automatic interface? It's something like this:
public interface IUserRepository {
[SQL("select * from user where id=@id")]
List<User> GetUser(int id);
[SQL("storedprocdoesstuff")]
void DoStuff(Stuff stuff);
}
And that's it. There's no code that actually implement the interface. You can call them directly and the framework wires up everything
Technically, this is not much different from writing inline. But I always felt it worth the hassle just for the sake of having all SQL-ish code in one place.
The text was updated successfully, but these errors were encountered:
I was told it's easier to inject and unit test that way.
And speaking of interface, are you familiar with Insight.Database's automatic interface? It's something like this:
And that's it. There's no code that actually implement the interface. You can call them directly and the framework wires up everything
Technically, this is not much different from writing inline. But I always felt it worth the hassle just for the sake of having all SQL-ish code in one place.
The text was updated successfully, but these errors were encountered: