1

I have a Dynamics crm 2011 on-premise. I want to create update delete and read crm's data in asp.net core mvc application. I should add xrm sdk packages to my project's packages. I have not found any lib and package of xrm for asp.net core mvc web application. I know how do crud in asp.net mvc web application. Can you help me how i can do crud with crm in asp.net core mvc?

I have a crm web service and i should connect to it and do crud with it . I also should make possibilities that user could change crm's data and fields and tables's structure. I want to connect to crm and get metadata of it and then create model of it and then create scaffold (controller and view) of model. I can't do this (scaffold via code) in asp.net mvc web application .net framework .

2 Answers2

0

You have a couple of options.

  1. You can run your Core application on the full framework. This adds more bulk to the application, but it allows you to then utilize any .NET Framework library in your Core application

  2. Now that .NET Core 2.0 is released, you can natively reference any .NET Framework library from a project targeting .NET Core. It's not guaranteed to work completely, however, but it will at least let you add the reference and try. It basically just attempts to map the .NET Framework API calls the library makes to .NET Standard APIs that .NET Core can utilize. As long as the library doesn't use anything outside of the compatible version of .NET Standard, it will run fine.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
0

It's possible to interact with the Dynamics CRM webservice w/o any 3rd party tools, just using SOAP/Webservice requests. Unless you want to directly create extension that run within Dynamics CRM (such as Apps, or extending Dynamics CRMs functionality), you don't need the XrmSDK at all.

So, just use download the WCF Connected services from Visual studio 2017 Marketplace.

Then generate WCF classes and proxy services from the CRM's service url. for on-premises it's http[s]://ServerName/OrganizationName/XRMServices/2011/Organization.svc.

For Dynamics CRM Online see the docs

For Microsoft Dynamics 365 (online)

Use the following URLsto access the organization service ( SOAPendpoint): https://OrganizationName.api.crm.dynamics.com/XrmServices/2011/Organization.svc (North America) https://OrganizationName.api.crm2.dynamics.com/XrmServices/2011/Organization.svc (South America) https://OrganizationName.api.crm3.dynamics.com/XrmServices/2011/Organization.svc (Canada) https://OrganizationName.api.crm4.dynamics.com/XrmServices/2011/Organization.svc (EMEA) https://OrganizationName.api.crm5.dynamics.com/XrmServices/2011/Organization.svc (APAC) https://OrganizationName.api.crm6.dynamics.com/XrmServices/2011/Organization.svc (Oceania) https://OrganizationName.api.crm7.dynamics.com/XrmServices/2011/Organization.svc (Japan) https://OrganizationName.api.crm8.dynamics.com/XrmServices/2011/Organization.svc (India) https://OrganizationName.api.crm9.dynamics.com/XrmServices/2011/Organization.svc (North America 2) https://OrganizationName.api.crm11.dynamics.com/XrmServices/2011/Organization.svc (United Kingdom)

Community
  • 1
  • 1
Tseng
  • 61,549
  • 15
  • 193
  • 205
  • tank you for your help i am trying this. my colleague is writing a wcf and i will connect to it. – fateme zahiri Aug 21 '17 at 07:04
  • It is not supported at least on CRM 2015. Visual studio fails to generate code because .net core 2.0 does not support `System.ServiceModel.Channels` – Rast Dec 06 '17 at 13:24