Results 1 to 3 of 3

Thread: Generate classes from SSMS in Visual Studio 2019

  1. #1

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,628

    Generate classes from SSMS in Visual Studio 2019

    PasteSQL C# Classes

    This add-in will allow you to paste SQL create statements from SQL Server and create C# classes from the table. In SSMS, Right click on a table, Script Table as> Create to> Clipboard.

    Only tested with C#.

    Once a class is generated you can not repeat the generation again and will not be in VS2019 clipboard history.

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    10,598

    Re: Generate classes from SSMS in Visual Studio 2019

    How does this compare to the .tt file that (used to be) is included with PetaPoco?
    "Code is like humor. When you have to explain it, itís bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,628

    Re: Generate classes from SSMS in Visual Studio 2019

    Quote Originally Posted by dday9 View Post
    How does this compare to the .tt file that (used to be) is included with PetaPoco?
    I never heard of PetaPoco before, took a quick look at PetaPoco.Core.ttinclude and with that the PasteSQL is limited in that it only does SQL-Server unlike PetaPoco which does multiple databases.

    Several months ago I created a utility for teaching C# to Cold Fusion developer that also generate classes for an entire database. But outside of class there really no use yet works great. And was used to answer a Stackoverflow question.

    My intent for posting the add-in for those who might benefit from it using SQL-Server. For me, I use EF Core Power Tools for generating classes from either Oracle or SQL-Server as all my work is with relational models and when it comes to non database classes I do TDD and/or generate concrete classes from anonymous types using R#.





















    3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width