Example of a MVC.Net Web Appl. to Communicate with NAV db

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2012-07-30 in Download section
Example of a MVC.Net Web Application to Communicate with a NAV Database
A working example of how to use an MVC.Net Razor web project to connect to a Dynamics NAV database, allowing you to change companies on the fly while using the Entity Framework.

For a tutorial on this topic, please see: http://blog.dynms.com/2012/07/how-to-us ... s-nav.html

http://www.mibuso.com/dlinfo.asp?FileID=1454

Discuss this download here.

Comments

  • bastirbastir Member Posts: 27
    Thanks a lot for sharing this solution.

    I've searched for a while for an easy mvc "template" and was very happy to find this one even with the complete NAV integration.

    I tested it with VS2012 and everything was working.

    Best regards
    Sebastian
  • ara3nara3n Member Posts: 9,256
    This solution doesn't execute the business logic, or did I miss that? Accessing tables directly is not the recommended way to integrate with NAV.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bastirbastir Member Posts: 27
    Hi ara3n,

    this is correct, you are reading and writing directly from/to the tables.
    But I'm sure this example can be modified to use nav webservices, too.

    Last but not least the developer should allways know what he's doing.
    Otherwise he should keep his fingers away of this.
  • tim_dynmstim_dynms Member Posts: 1
    Hi Bastir,
    You're welcome.

    Hi ara3n,
    You're entirely correct and I'm glad you pointed that out: no business logic is executed and as such carries risk and limited applicability with it (for example you couldn't post documents).

    To provide some context: this download is part of an example series that we plan to do about various web integration options with Dynamics NAV.
    In the first blog post on this topic we introduce some of the options available, and some decisions to make when choosing them ( http://blog.dynms.com/2012/07/web-integ ... s-and.html ).
    In that article we also describe how no business logic is available when using the database option, and we'd love to hear more on the topic.

    In the future we're hoping to extend this with an example using the 2009 web services, and Odata.
    This particular example is to work with the tutorial here: ( http://blog.dynms.com/2012/07/how-to-us ... s-nav.html ).

    Thanks for the feedback,

    -Tim
    Dynamics Manufacturing Solutions
  • jayendrasinhgohiljayendrasinhgohil Member Posts: 1
    Thanks for sharing this solution.
    It's very useful for Add-On developer.
Sign In or Register to comment.