Giter Site home page Giter Site logo

aquevix / llblgenpro_ss_api_razor_templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattjcowan/llblgenpro_ss_api_razor_templates

0.0 2.0 0.0 60 KB

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

llblgenpro_ss_api_razor_templates's Introduction

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

llblgenpro_ss_api_razor_templates's People

Contributors

mattjcowan avatar

Watchers

James Cloos avatar Amit Jindal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.