2

What is the best way to handle this situation. I am working with legacy stored procedures and one of the stored procedures uses code like this

select c.Name AS 'Company Name' ... 

I want to execute the stored procedure and have it map to my model correctly but what should I name the variable if the returned column has a space in it? Do I use the actual DB table column name as a fallback?

Example:

SqlQuery<MyCustomModel>("exec MyStoredProcedure").ToList<MyCustomModel>();

My Model:

class MyCustomModel
{
    public String Company_Name { get; set; } //<-What do I do here? 
}
DavidG
  • 104,599
  • 10
  • 205
  • 202
Ellery
  • 1,272
  • 1
  • 14
  • 22

0 Answers0