1. Samuel Sanchez Avila
  2. SnapDevelop
  3. Friday, 7 February 2020 16:40 PM UTC

With .NetDataStore we can send datawindows from PB and make process with insert/delete/update and some filters, But i still dont know for what it is ModelMaper.. Is there any guide/tutorial/example for ModelMapper? or diferences between this two?

Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 February 2020 16:50 PM UTC
  2. SnapDevelop
  3. # Permalink

The SqlModelMapper is going to have less features than the .NET DataStore.  The reason is that the SqlModelMapper follows a different design philosophy that the data object should be performing very specific operations only.

The key advantage of the SqlModelMapper compared to the .NET DataStore is that it supports nested models whereas .NET DataStore does not.

However, if you are trying to migrate any existing DataWindows or PowerScript code to C#, then you need to use the .NET DataStore.  The automated C# migration tools we provide won't work for the SqlModelMapper.

Here are various tutorials for the SqlModelMapper:

Here is sample code for SqlModelMapper that you can study:

Here is the API documentation for SqlModelMapper: 

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 7 February 2020 19:20 PM UTC
Hi Ricardo, We don't have such documentation, but not sure it makes sense to provide. There are plenty of resources online to get educated about MVC architecture. As far as the specific design pattern, well that depends on how the developer writes the code or what scaffolding template they use. The default templates provided in SnapDevelop 2019 R2 are essentially repository design pattern. Again, there are plenty of resources online to get educated about repository pattern. We are trying to limit our documentation to things that are specific to our product and other online resources not available.
  1. Helpful
  1. Ricardo Jasso
  2. Friday, 7 February 2020 21:08 PM UTC
It sure can help us coming from Appeon because we start listenting to things like ModelMapper and we may not even know what a model is. So we need to investigate ourselves and try to figure out what is it that Appeon is providing us and how can we use it effectively. Not a tutorial just some short explanation of it. MVC is one of many possible design patterns a programmer can follow. A simple mention in the documentation that the new components are related to MVC and/or references to places where we can educate ourselves will surely help us.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 7 February 2020 21:49 PM UTC
I understand your point. Is there some short explanation of MVC you can point us to that you think it is a good example? I prefer an example that is for MVC rather than current PB help as example.
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.