How to use existing Stored Procedures???

Mar 25, 2014 at 10:10 PM
I am trying to start using all the patterns that you offer with this framework, btw cool, but at some point because my business rules demand it, I have to use an existing stored procedure in my project, but I don't know how to do it and where to put it in the classes structure.
I know that using EF we can do something like this:
public ICollection<Customer> GetCustomers(string company, string contactTitle)
{
return Database.SqlQuery<Customer>( "EXEC GetCustomers @Company, 
@ContactTitle"
, new SqlParameter("Company", company)
, new SqlParameter("ContactTitle", contactTitle))
.ToList();
}
thanks
Coordinator
Mar 26, 2014 at 11:24 PM
Edited Mar 26, 2014 at 11:28 PM
Marked as answer by lelong37 on 3/31/2014 at 10:23 PM