jonwagner/Insight.Database — pull request #65 by ronnieoverby (2013-11-28 00:59:40+00:00)
Title: Schema attribute for auto interface

I had an idea for a feature, so I tried my hand at implementing it. The building/testing of your project is over my head, so I have no idea if this works or not, but I wanted your feedback.

Of course, it's related to SQL server schemas.... 8^P

Our database has sprocs that aren't in the `dbo` schema, so I was having to do this:

```c#
public interface IAccountsRepository : IDbConnection, IDbTransaction
{
[Sql("Money.GetAccountsByUserId", CommandType.StoredProcedure)] // lame!
Task> GetAccountsByUserIdAsync(int userId);
}

```

... but I'd rather do something like this:

```c#
[Schema("Money")]
public interface IAccountsRepository : IDbConnection, IDbTransaction
{
Task> GetAccountsByUserIdAsync(int userId);
}

```

It's cleaner and will increase readability once there's millions of stored procedures.

What do you think? Will my changes work at all?