EF Code-First

  • Jeff Moden

    SSC Guru

    Points: 997150

    You should write an article on it and submit it.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Steve Collins

    Ten Centuries

    Points: 1091

    Ok Jeff, I'll do whatever you suggest.  I'll submit something.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Steve Collins

    Ten Centuries

    Points: 1091

    bbsimonbb wrote:

    Some code to look at?

    JsonAutoService

    bbsimonbb wrote:

    And what does this sentence mean... "It isn't (and wasn't) possible to access the request route values from within the program delegate." ? Are you letting the DB respond directly to an HTTP request?

    JsonAutoService works by serializing the inputs from http requests and sending them directly to SQL Server.  One source of request information is the request url, or route.  Lots of times the request route contains parameters which specify which rows to access/apply CRUD statements.  For example, 'https://www.xyzco.com/api/products/profile/23467' the parameter value 23467 needs to be sent to SQL Server to access that particular product.

    Created an Api solution project using .NET full framework 4.7.1 and put a breakpoint on line 1 of the default Controller.  Hit F5 to run the solution and it immediately hits the breakpoint.  In Visual Studio's Locals window expanded open the HttpContext (which is the http information available to the program delegate).  The route values cannot be found.

    FullFramework

    A delegate is a pointer to a method.  The program delegate is the method invoked by the program as it runs.

    Created an Api solution project using .NET Core 3.1 and put a breakpoint on line 1 of the default Controller.  Hit F5 to run the solution and it immediately hits the breakpoint.  In Visual Studio's Locals window expanded open the HttpContext.  The route values can be found in a dictionary!

    NETCore

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Steve Collins

    Ten Centuries

    Points: 1091

    Jeff Moden wrote:

    You should write an article on it and submit it. 

    Steve Collins wrote:

    ...I'll submit something.

    Since this was written I've been on this trying to make it happen.  Wow, 3 months ago already.  The initial article is done but it needs approvals and the timing needs to correspond to business things outside of my control.  The article demonstrates the approach with a single example.  An article, 1 article, isn't going to cut it though.   More are in the works.  It's been very frustrating.  Maybe it was crazy to try, or idk.  I don't really know what I'm doing (beside maybe 🙂 technically) and everyone else seems to know what they want from it.  It's not like the code is mine.  I work for a small company and it's theirs.  Now the discussion is what the 'bio' in the article is supposed to say... it has to be approved which feels weird.  The current world environment uncertainty has certainly impacted the business's priorities and that in turn impacts this project.  On the plus side I've had a lot of help.  Hopefully the article can be submitted to SSC next week and the feedback is good.

    The company had some logo's created for another project which didn't get used so we "re-purposed" one.  It turned out great imo!

    Attachments:
    You must be logged in to view attached files.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • This was removed by the editor as SPAM

  • This was removed by the editor as SPAM

  • Steve Collins

    Ten Centuries

    Points: 1091

    Progress.  We have 2 videos which are presentation ready.  The Demo video we recorded 5 times and the Quick Start video 3+ times.   It's taken multiple iterations.  Nobody listens to videos with bad audio but it takes the right set up to get it right, now we know.  The editing, audio/visual and everything was done by a friend and colleague.  The Demo video is meant as a companion to the SqlServerCentral article (which will be submitted when there's a relaunched website for my employer (consulting company).  All of the assets for the site have been delivered, I'm told, so it's just a matter of time.

    Besides appealing directly to SQL experts the goal is for the library to be "discoverable" by people looking for a data access solution.  To go along with the SSC article(s) (and video(s)) we have Github repo(s) which still need final updates.  Now that the 2 videos are "finalized" we can move forward in these other areas.

    The plan for video(s) is as follows:

    1. A New Approach to Data Access - Demonstration (companion to SSC article, done)
    2. Quick Start (done)
    3. Beyond the Demo Part 1: Resource Filter (recorded 1-time, needs to be redone)
    4. Beyond the Demo Part 2: Context Direct (ready to record)
    5. Beyond the Demo Part 3: Dependency Injection (DI) Client (ready to record)
    6. Introducing JsonAutoService (1 minute Splash video) (in process)

    Demo (companion video to SSC article "A New Approach to Data Access")

    https://www.youtube.com/watch?v=Px-_i61fOnE&t=4s

    Quick Start

    https://www.youtube.com/watch?v=FTn0IcZi_70&t=7s

    It would be nice if this whole thing sprung up out of the ground already completed.  It's not like that though.  I'm committed to do whatever it takes.  As SQL professionals we've all been shortchanged by the tools available for data access.  The existing ORM solutions were written by server programmers to work the way they want it to work.  That's a very big flaw.  We need a data access approach that fully supports set based solutions and makes drastic improvements in speed, security, reliability, and workflow.  Once JsonAutoService is explained to people I don't believe they'll use other approaches.  The old way, which is the current way, is counterproductive in comparison.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Steve Collins

    Ten Centuries

    Points: 1091

    Submitted the SSC article last night

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • vondes

    Grasshopper

    Points: 13

    It is not the first time I am reading such a comment. I do not remember exactly where I saw it, possibly, om some local forums. I am from https://worldpostalcode.com/united-states/florida/tampa. So I wanted to know if you are happy with this car in general. How would you compare it with other models? I was looking at it, but I have some doubts. So I try to learn more about it.

    • This reply was modified 1 week ago by  vondes.
  • Jeff Moden

    SSC Guru

    Points: 997150

    vondes wrote:

    t is not the first time I am reading such a comment. I do not remember exactly where I saw it, possibly, om some local forums

    You do realize that's true for virtually 100% of all comments on SQL Server, right?  It's a very rare thing when someone comes up with something new.

    Considering that your super generic comment sounds an awful lot like a "test probe" from a new spammer and, if you are a spammer, I'll tell you you're wasting your time here.  SPAM lasts about 60 seconds on this forum if it makes it onto this forum at all.

    If you really are an interested newbie to the forum, the welcome aboard.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 10 posts - 16 through 25 (of 25 total)

You must be logged in to reply to this topic. Login to reply