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?
- You are here:
-
Home
-
Q&A
-
Q&A
-
SnapDevelop
- .Net DataStore & ModelMaper
- Samuel Sanchez Avila
- SnapDevelop
- Friday, 7 February 2020 16:40 PM UTC
Accepted Answer
- Friday, 7 February 2020 16:50 PM UTC
- SnapDevelop
- # 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:
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/CRUD_Operations_with_SqlModelMapper/index.html
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/Working_with_Transactions_in_SnapObjects/index.html
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/Tracking_Actions_in_SqlModelMapper/index.html
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/Using_Nested_Models_in_SqlModelMapper/index.html
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/Add_Data_Validation_to_SqlModelMapper/index.html
- https://docs.appeon.com/appeon_online_help/snapobjects2.0/Type-Safe_Queries_Using_SnapObjects_API/index.html
Here is sample code for SqlModelMapper that you can study:
Here is the API documentation for SqlModelMapper:
Comment
Load more comments
![Armeen Mazda @Appeon](https://community.appeon.com/images/discuss_avatar/picture-4727-1492538347.jpg)
- Armeen Mazda @Appeon
- 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.
-
Helpful Loading... Helpful 0
![Ricardo Jasso](https://community.appeon.com/images/discuss_avatar/picture-10745-1549048005.jpg)
- Ricardo Jasso
- 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.
-
Helpful Loading... Helpful 0
![Armeen Mazda @Appeon](https://community.appeon.com/images/discuss_avatar/picture-4727-1492538347.jpg)
- Armeen Mazda @Appeon
- 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.
-
Helpful Loading... Helpful 0
There are no comments made yet.
There are replies in this question but you are not allowed to view the replies from this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »