1

We are moving from classic ASP to ASP.NET. Our current website uses hundreds of stored procedures and we are looking at gradually converting these to LINQ. We are also using POCO Entities using the Text Template provided by Microsoft to aid in the testing process. At the moment, we have a DatabaseContextEntities class (partial class defined in 2 different files) which implements IDatabaseContext which in turn implements IDatabaseContextStoredProc and IDatabaseContextLinq.

When a stored procedure is converted to LINQ, it should also be removed from the model, which means that the class generated from the POCO text template will no longer include the method definition in the C# class. In this case we manually define it in the 2nd file(remember that DatabaseContextEntities is defined in 2 separate files).

My question is how do I update the interfaces to reflect the changes to the 2nd file? Since the IDatabaseContext is generated based on the contents of IDatabaseContextStoredProc and IDatabaseContextLinq the function import will no longer contain a method definition for the converted StoredProcedure.

Are text templates the right way to go about this and how do I implement this?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Anthony Wood
  • 395
  • 1
  • 3
  • 16

0 Answers0