Automatically create C# wrapper classes around stored procedures

后端 未结 6 2220
面向向阳花
面向向阳花 2021-02-06 09:51

I\'ve inherited a rather large application that really could use some cleanup. There is data access code littered throughout the application. In code behinds, some in business l

6条回答
  •  耶瑟儿~
    2021-02-06 10:18

    If you have access to .NET Framework 3.5 and Linq to SQL, you can do it very easily, check this video:

    LINQ to SQL: Using Stored Procedures

    Using existing stored procedures and functions is easy with LINQ. We simply drag the stored procedures onto the O/R mapping surface and call them from the generated Data Context object.

提交回复
热议问题