Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. SQLMetal , Linq and Business Logic location question.

SQLMetal , Linq and Business Logic location question.

Scheduled Pinned Locked Moved LINQ
csharpdatabasequestionsql-server
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephen Knott
    wrote on last edited by
    #1

    Hi, I have inherited an application that was written in VB6, and SQL. The business logic all sits inside stored procedures and triggers in the SQL Server. I am looking at re-writing the interface (WEB and Winforms) in C# (.net 3.5). I have been looking at using ORM to generate a DAL, and thought I would try SQL Metal and LINQ for starters. Due to most of the business logic being in stored procedures, I don't want to mess too much with them, as they are working in the live environment. When I use SQLMetal to generate the class file, it includes all my tables , stored procs etc as I required. I will be using this DAL across 2 main applications, a winforms app and a web app, and there are a few developers going to be using it. I have a good understanding of the database and the related business logic, so I am able to determine when I should be updating the data in the table directly, or whether I should be using a stored proc with custom logic to update /create records. The problem comes in, with other developers who don't know this. Is there a good way for me to disable certain tables / stored procs, as I don't want them all in my code. And is there a way for me to specify which DAL options I want .. i.e. I don't want Insert or Update for some tables. i.e. Table A - generate full DAL code Table B - generate only read DAL code, i.e. disallow the Insert and I will add a method in a partial class handling this. Table C - Do not generate DAL (internal table used only in SQL) It seems strange that I can't specify these types of things with SQLMetal. The database is currently under constant changes, and the DAL will need to be regenerated often, and I don't want to have to remove things that shouldn't be there all the time. Do I stick with SQLMetal or should I look at another ORM tool ? Any suggestions ?

    E 1 Reply Last reply
    0
    • S Stephen Knott

      Hi, I have inherited an application that was written in VB6, and SQL. The business logic all sits inside stored procedures and triggers in the SQL Server. I am looking at re-writing the interface (WEB and Winforms) in C# (.net 3.5). I have been looking at using ORM to generate a DAL, and thought I would try SQL Metal and LINQ for starters. Due to most of the business logic being in stored procedures, I don't want to mess too much with them, as they are working in the live environment. When I use SQLMetal to generate the class file, it includes all my tables , stored procs etc as I required. I will be using this DAL across 2 main applications, a winforms app and a web app, and there are a few developers going to be using it. I have a good understanding of the database and the related business logic, so I am able to determine when I should be updating the data in the table directly, or whether I should be using a stored proc with custom logic to update /create records. The problem comes in, with other developers who don't know this. Is there a good way for me to disable certain tables / stored procs, as I don't want them all in my code. And is there a way for me to specify which DAL options I want .. i.e. I don't want Insert or Update for some tables. i.e. Table A - generate full DAL code Table B - generate only read DAL code, i.e. disallow the Insert and I will add a method in a partial class handling this. Table C - Do not generate DAL (internal table used only in SQL) It seems strange that I can't specify these types of things with SQLMetal. The database is currently under constant changes, and the DAL will need to be regenerated often, and I don't want to have to remove things that shouldn't be there all the time. Do I stick with SQLMetal or should I look at another ORM tool ? Any suggestions ?

      E Offline
      E Offline
      Eslam Afifi
      wrote on last edited by
      #2

      Add new item -> LINQ to SQL classes Drag and drop tables and stored procedures you want from the Server Explorer (or Database Explorer).

      Eslam Afifi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups