What is the best practice to manage stored procedures in C# code?

Viewed 2519

I'm quite new here, so please forgive me if I made any deviation from the rules of this website.

I'm trying to find the best way possible to manage the names of a stored procedure in code.

Currently when I'm calling a stored procedure I'm using this code:

public static DataSet GetKeyTables()
{
    DataSet ds = new DataSet();
    ds = SqlDBHelper.ExecuteMultiSelectCommand("Sp_Get_Key_Tables", 
        CommandType.StoredProcedure);
    return ds;
}

But I don't think that stating the name of the stored procedure in code is a wise idea, since it will be difficult to track.

I thought about Enum or app.config solutions, but I'm not sure these are the best ways.

Any idea will be highly appreciated.

5 Answers
Related