How can I get all DataEntity data from Dynamics AX(Finance and Operations)? - dynamics-ax-2012

I tried the X++, but it seems that X++ can only query the Entity from the reference packages. If I created another package with custom Entity, I have to append new reference in the X++ code package. It has a lot of manual actions.
I also tried the OData Service, but the Entity with IsPublic=No cannot be queried from OData Service.
Is there any other method to get all DataEntity data from Dynamics AX (Finance and Operations)? I'm working on the Dynamics Finance and Operations.
Thanks a lot,
Tilerphy

Related

i18n in asp.net using resources and entity framework

I've been trying to store my strings in a database using resource files to fetch them. I've been following the guide from http://afana.me/post/aspnet-mvc-internationalization-store-strings-in-database-or-xml.aspx
The example works fine enough when i use his sql code based on ADO.net to fetch the strings from the database.
But i want to use Entity Framework to fetch the strings from the database, because my translation table is quite different. Could anyone show me an example of how to use Entity Framework in the resource project(assembly?), because i can't seem to get it to work. I cant import any of my models or contexts from my main project with "using", and it tells me i have duplicate models when i copy them to the resources project/assembly

The model backing database is out of date ASP.NET

I get an error when I try publishing and going to my website. It says
You get this error when your c# code model is not in sync with your database tables.
Doing an EF migration will help to align those two things since EF will generate a set of SQL scripts to transform your database model to match up with your c# entities.

Can not create an object from entity data model

I am using ASP.NET MVC 4 in visual studio 2010.
I created a an entity data model from a local database, but when I try to create an entity object with the name of the entity, the intellisense in Visual studio 2010 does not show any suggestions, and I can not create the object.
for example, I created an entity data model with name "airlinesEntity", but I can't create an entity object from it. If anyone knows what is it that I am doing wrong or I need to do something more, please let me know. Thank you very much.
Is there any chance you might have installed VS2012 earlier and then uninstalled it? If so, then some of the dll's might have gotten corrupted.

System.InvalidOperationException: Mapping and metadata information could not be found for EntityType

I have an ASP.NET 4.0 web application that uses Entity Framework 4.3.1 and Self-Tracking Entities. It works fine until I add another ADO.NET Entity Data Model (.edmx) file to it. After that the project compiles without any errors, but as soon as it calls a self-tracking entity object, the application produces the System.InvalidOperationException: Mapping and metadata information could not be found for EntityType 'namespace.classname'.
I have tried adding the second ADO.NET Entity Data Model into a different namespace - but that does not help.
If I remove the added .edmx file from the project, the problem disappears.
If I remove the Self-tracking entity files (Model.tt and Model.Context.tt), the problem disappears.
It looks like Self-Tracking Entities cannot function properly when there is more than Entity Data Model.
Has anyone else experienced and solved this problem?
Make sure to use consistent Context generation throughout your solution.
Use the EF 5.x DbContext Generator on each of your Entity Data Models. You can either download the template via the ExtensionManager (search for EF 5.x) or here
I think self tracking entities are not supported from 4.1 (DbContext) onwards.
We had a few problems at work when upgrading from 4 to 4.2 with ste and we ended up reworking all to use DbContext and getting rid of ste. Since then it works like a charm!

Validate EF Code first model against existing database

Is there a way to check that a DbContext matches the database when the database was not created by EF code first?
I am looking for similar functionality to Database.CompatibleWithModel but there is not metadata.
There is currently no way in EF to do this; however, you may be able to use the DDL script as a starting point for verifying that all the artifacts exist in the database. To get this script, use
string ddlScript = ((IObjectContextAdapter)myContext).ObjectContext.CreateDatabaseScript();
Some tools may be able to use this script to do a schema compare against your database. This will tell you if your model is compatible.
Have you tried using Entity Framework Power Tools.
you can use the tools to Reverse Engineer Code First - Generates POCO
classes, derived DbContext and Code First mapping for an existing
database.
And then maybe you can compare the reversed engineered information with what you already have.

Resources