Stored Procedures to modify MS-SQL data?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EinToR
    New Member
    • May 2008
    • 20

    #1

    Stored Procedures to modify MS-SQL data?

    I'm somewhat new to C# and a looking over a .NET web application that someone else developed. Is it standard practice to create stored procedures (over 90 of them) to do repeditave tasks such as insert/update/delete/select? I've always created static classes to do this. Are there any up's or down's to either?

    I'd appreciate any input.

    Thanks,
    EinToR
  • Sick0Fant
    New Member
    • Feb 2008
    • 121

    #2
    Originally posted by EinToR
    I'm somewhat new to C# and a looking over a .NET web application that someone else developed. Is it standard practice to create stored procedures (over 90 of them) to do repeditave tasks such as insert/update/delete/select? I've always created static classes to do this. Are there any up's or down's to either?

    I'd appreciate any input.

    Thanks,
    EinToR
    Well, if you have a stored procedure, then you won't have to repeat cumbersome queries in C# (i.e. it's easier to code SQL in SQL syntax than it is to code SQL in C#). You should still have a data access class, as I don't think it's common to access data directly from your main program.

    Comment

    • EinToR
      New Member
      • May 2008
      • 20

      #3
      Thanks for posting,

      It was written with Dot Net Nuke in VS2008 .NET 3.5. When I go through the source, everything's in user controls. It just doesn't look right to have 90+ stored procedures rather than a class. There has to be another cleaner way to do that.

      Comment

      • Kenster
        New Member
        • May 2008
        • 6

        #4
        Good question.

        I am currently writing an MMORPG and I have the same thing. SaveCharacter, DeleteCharacter , SaveQuest, DeleteQuest, GetQuest....... Considering all the syntax are nearly the same with just a VAR change, there should be a cleaner way to go about it.

        Comment

        Working...