Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Data Access Concepts and Retail SDK

(0) ShareShare
ReportReport
Posted on by 10

Hello,

Firstly, I appreciate anyone taking the time to answer.  I feel I have to give a short description of my situation so it might be better understood what angle I’m approaching 365 from:  I have never developed for Dynamics 365 before.  I have recently been given a task to delve into the Commerce and Operations component and need some clarity on concepts and some details that I’m not sure about.  I am a .NET developer and we are attempting to expand the it’s (.NET’s) footprint for our project.  I’ve tried to get some of the Retail SDK projects to execute to no avail. The one that I’m particularly interested in is ‘StoreHoursSample’ because I need to make a new Table for the Channel DB. I’m really just focused on the Data Access component of Commerce Runtime.   If I can pinpoint where I am wrong and right in my assumptions then I can get a better idea of how to address resolving my problems.  My goal is to create a table, see the results on the Cloud-side of the environment and generally get CDX flowing with extensions.

  1. Am I correct in assuming that I also need to create something similar to a ‘TestHost’ project for my own solution and that will be my Startup Project?
  2. There is a reference to Entity Framework of which I’m familiar with and the description of ‘StoreHours’ is ‘This sample shows how to create a new business entity (StoreHours) across both Commerce and the channel’. Should I think of this as a ‘Code First’ implementation? i.e.: I am creating objects in C# that will eventually become tables?  I assume that isn’t true, but seeing the reference and reading the description had me thinking it is possible.  Viewing the ‘StoreDayHours’ class you can see the similar way it’s written as an Entity is with EF.  Or… as a first step do I run a Create Table query as outlined with this document: https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/channel-db-extensions .  I’ve successfully created a table in ‘AxDb’ this way but do not see results in the Cloud Environment.  Am I not be following a step properly in the RetailSDK document specific to this project such as running batch jobs?
  3. I was told that ‘AxDB’ was exclusively a F&O DB but I don’t believe it to be so. I get a little mixed up with some of the naming, but I realize that F&O is using X++ so there may have been an assumption not to mess with that DB from C&O. There are tables that I see in the Cloud-side Environment that directly correspond to ‘AxDB’.  Does this mean that AxDB is the Headquarters DB and that the Channel DB inherits a filtered list of tables from AxDB?
  4. I was informed that the pulldown menu ‘Dynamics 365’ is used exclusively for F&O. If I’m correct concerning the AxDB as described above, in contrast I think it is used for C&O also.  Coming at this from my perspective the ‘Synchronize Database’ and ‘Create Model’ menu options are a method of executing my code that I’ve written for CRT.  Is this a step that I need to take or should I simply be running/executing the Console?
  5. I admittedly haven’t looked into this much yet, but I generally have the idea that you create/manipulate views through the Site Builder. If I create a table, I can display the data through that tool and create my own pages.

Thanks a lot for your time,

Unkus

  • Unkus Profile Picture
    Unkus 10 on at
    RE: Data Access Concepts and Retail SDK

    Hi Ram,

    Thanks for taking the time to respond and help to clear up some incorrect assumptions I had.  I'm going to look more closely at the architecture and move through the SDK document again.  I may have some follow up questions, but for now this is more than satisfactory.

    Have a good day,

    Unkus

  • Verified answer
    Ramshenkar Profile Picture
    Ramshenkar on at
    RE: Data Access Concepts and Retail SDK

    Hi

    I will try to answer for you queries on each point. Moreover, I understand you are from .Net background and learning Dynamics Retail/Commerce.  My recommendation will be understand Retail architecture before starting development, because this will be key important point to perform development. (I was also moved from .Net development to Retail and apart from architicture, understanding data flow there was no big challenge)

    Answering point to point so refer your original questions for each respective question. 

    1. 'Testhost' project can be one of the client to test your customizations at initial stage but eventually if you have to consume the customizations in eCommerce / POS to verify. I do not use 'testhost' and will prefer to test customization directly on client. Take a note, Fiddler is the tool which will be very helpful to understand the data flow between different layer of Retail

    2. It is Entity Framework and consumed by OData Service (retail server). Don't think about 'code first' or 'database first' in regards with retail, it is always parallel process which follow its own (Retail) architecture. You should create tables and entity classes, controller parallelly and test it. Follow the mentioned document or store hour project. 

    Understand the data storage mechanism 1. HQ and 2. Channel. You should again use fiddler to identify which layer of customization failing to retrieve and show the data. 

    3. 'AxDb' is exclusively for F&O but that's true for Prod and UAT environments because there is concept of scaling unit. For Dev environment AxDb hold both data HQ and channel and you can distinguish by schema. dbo is for F&O data objects, ax and crt are for channel data object, ext are for custom data objects.

    4.  â€˜Synchronize Database’ and ‘Create Model’ options are for F&O database and code respectively. It doesn't have to do anything with CRT. 

    5. If you have created a table in channel database, that's not enough to show data on your pages. Create tables -> Populate data (CDX or user enter) -> Write CRT business logic -> create retail server OData API to expose the business logic -> then consume that to show data on your own pages in site builder. 

    Hope it gives you little more clarify. If it is please marked are answered so it can help others in community. 

    Regards, 

    Ram 

  • Ramune Profile Picture
    Ramune on at
    RE: Data Access Concepts and Retail SDK

    Hi Unkus,

    I will leave this for the community to answer. Let's see if anybody has experienced the same and can advise for you anything. If we find any information related to your question, we will share with you later.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans