A set of LLBLGen Pro templates to generate a fully RESTful ServiceStack API and HTML interface to manage domain entities.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
llbl
sql
src
src_v4
.gitattributes
.gitignore
CONTRIBUTORS.md
README.md
cligenerate.v4.bat

README.md

Please read the blog post Generating a fully RESTful Api and UI from a database with LLBLGen and ServiceStack to learn more about this project.

LLBLGen Pro and ServiceStack REST Api and Razor Templates

A set of LLBLGen Pro templates to generate a fully RESTful ServiceStack API and HTML interface to manage domain entities.

DEMO

CHANGE LOG

For all examples below, you may want to use Chrome or a browser that can show you JSON results (IE tends to force a download of json files, or use Fiddler). Chrome is nice in the sense that it always displays the reponse from the server, regardless of status code (200, 400, 401, 404, 500, etc...) and regardless of the content type (JS, XML, etc...).

Update - June 23, 2013

  • Upgraded ServiceStack References: from 3.9.38 to 3.9.54
  • Added Theming Capability for Razor Views: by enhancing the RazorFormat class (works for view pages, content pages and razor handlers)
  • Added SQL Resultset Caching to V4 templates: use a new rcache querystring parameter to identify the number of seconds you wish to cache resultsets for (use 0 to force cache refresh, uses LLBLGen Resultset Caching)
  • DataTable implementation enhancement: now when adding/removing columns in the UI, you are truly only fetching the columns being displayed from the database

Update - May 11, 2013

Added support for Typed Views and Typed Lists (for both LLBLGen 3.5 and 4.0, and using ServiceStack v3.9.38).

Update - May 3, 2013

Added a new LLBLGen Preset and some additional templates to make the project compatible with the newly released LLBLGen V4 release.

If you are using LLBLGen V4, please pick the "MJC.Presets.Adapter.ServiceStack.V4" preset when generating the code.

Update - April 4, 2013

The goal for this release was to give developers working with these templates and the generated code a means to further extend the code without impacting the code generation process and future releases of the templates.

Please use the "Issues" section of the GitHub project to file desired enhancements and/or point out issues with the code.

  • Primary Key and Unique Constraint requests now respond with a 404 status and a clean response for non-existent records

    Example: two sample responses for non-existent categorie (PK and UC)

    /categories/99999 (xml, json)

    /categories/uc/categoryname/non-existent (xml, json)

  • Added simple validation to the auto-generated services, for all CREATE/UPDATE/DELETE methods The validation gathers up the errors and sends them back with the response.

    Example: The following code is in response to a DELETE request with an invalid category id at URL: /categories/0

      { "responseStatus" : { "errorCode" : "ValidationException",
            "errors" : [ { "errorCode" : "GreaterThanOrEqual",
                  "fieldName" : "CategoryId",
                  "message" : "'Category Id' must be greater than or equal to '1'."
                } ],
            "message" : "Validation failed: \r\n -- 'Category Id' must be greater than or equal to '1'.",
            "stackTrace" : null
          },
        "result" : false
      }
    
  • Added partial methods throughout the generated code allowing anyone the ability to easily customize the code using partial classes

  • Added LLBLGen user regions throughout the generated code allowing developers to easily add bits of code where needed to extend existing functionality

  • Added some new settings in LLBLGen designer to specify where the Authenticate attributes should be generated

    • You can observe these settings by navigating to Project > Settings > LLBLGen Pro Runtime Framework > ServiceStack

Update - March 16, 2013

Initial Release - March 11, 2013

PLANNED FEATURES

  • Add relationship aliasing and join type clauses,
  • Be able to filter included items down (not just limit) in response (for example return products and orderdetails and orders, but only those orders where the quantity sold was greater then 30)
  • Be able to support aggregates (MAX, MIN, SUM, COUNT) and grouping clauses