Can I generate entity framework model by clicking button in browser in client-side and save it back to web server PC?
EdmGen is the way to go if you're sure this is the best solution to your problem: http://msdn.microsoft.com/en-us/library/bb896270.aspx
If you're having problems with it could you please post the command line arguments you're using to call it?
You'll have to create a process in your web app (System.Diagnostics.Process) in order to kick off the executable from the browser side.
As David Neale says EmdGen is an option, if that is really what you want.
There is also EmdGen2, which has the advantage that it is able to work directly with the Edmx file:
EdmGen2 is a command-line tool for the
Microsoft ADO.NET Entity Framework.
The tool can be used as a replacement
for the EdmGen.exe tool that ships
with the .Net framework 3.5 SP1.
EdmGen.exe can only read and write the
CSDL, SSDL & MSL file formats.
However, EdmGen2.exe can read and
write the EDMX file format used by the
Visual Studio design tools.
Additionally, EdmGen2.exe can
translate between EDMX and CSDL, SSDL
& MSL formats, and the source code can
act as examples on using the tooling
APIs defined in the
System.Data.Entity.Design assembly.
Additionaly, EdmGen2.exe contains some
experimental functionality not found
in EdmGen.exe. Ankit Malpani, an
intern with Microsoft Research in
summer of 2008, and James Terwilliger,
a Post Doc researcher with MSR,
updated EdmGen2.exe with the ability
to identify inheritance
relatationships in relational database
schema. You can access this
functionality by using the
"RetrofitModel" option. The
RetrofitModel option connects to a
database instance and constructs an
EDM model (csdl, msl, ssdl, and edmx
files) that includes inheritance. The
tool uses data mining techniques to
identify TPT and TPH patterns in the
database instance, as well as vertical
partitioning, and constructs a
suitable model and mapping. To use the
tool, launch EdmGen2 with the
following arguments:
Related
I try to create simple ASP.NET MVC5 app where I can access to my table. The table has user defined type inside.
I followed this tutorial:
http://www.asp.net/mvc/overview/older-versions-1/movie-database/create-a-movie-database-application-in-15-minutes-with-asp-net-mvc-cs
Unfortunately, when I use Entity Data Model and try to generate model from database, my UDT field is ignored. I've got an warning:
The data type 'Pesel' is currently not supported for the target Entity Framework version; the column 'x' in the table 'y' was excluded.
So my question is, how can I add my UDT to entity model?
I've tried to manually create a model and then use Entity Framework to generate controller and views. Again, UDT fields are ignored.
Thanks for help!
I've personally not used User Defined Types, but I'm sure you have a good reason for it. After reading your question, I decided to learn more about UDT's and try and find an answer for you. From what I've read, you should be able to do it as long as you reference the assembly for the definition in your project. Otherwise, your project will have no idea what the data type is or how to use it.
Here is some text from the "Professional C# 4 and .Net 4" book:
Using UDTs from Client - side Code
The assembly of the UDT must be referenced to use the UDT from client
- side code. Then it can be used like any other type on the client.
Because the assembly containing the UDTs is used both from the client
and from the SQL Server, it is a good idea to put UDTs in a separate
assembly from the other SQL Server extensions such as stored
procedures and functions.
I was trying to consume an already written WCF service into my BizTalk orchestration. But while configuring the ports and port types for the consumption, found that the 'WCF service consumption wizard' in Visual Studio offers HTTP transport-type as the only option and no WCF-BasicHttp/WCF-WSHttp transport-type options are available.
However, we can always do the required WCF-BasicHttp/WCF-WSHttp settings by importing the required bindings file from the BizTalk Admin Console, Is there a programmatic way for the developers to do the same from inside the Visual Studio (instead of specifying those bindings later from the Admin Console)?
The binding files are just XML, so you can create those programmatically. Modify the XML as you see fit, either by hand (e.g., in the built-in XML editor) or by using some sort of custom code.
Typically we use multiple binding files per environment, including one that just works with everything on localhost for developers. You just pick the one that you want and import it into BizTalk or write a script automatically import it for you (such as after build).
You can also take a look BizTalk Deployment Framework. For more of that.
Michael Stephenson has a great post on using MSBuild to automate your deployments, including the BizTalk binding files, here.
I am writing an application to transfer data between an in-house web application and a Microsoft Dynamics CRM 2011 instance. I generated early bound entity classes using the CrmSvcUtil included with the Dynamics CRM SDK with the following parameters:
crmsvcutil /l:vb /url:http://nameofserver/MicrosoftDynamics/XRMServices/2011/Organization.svc /out:myorganizationcrmsdktypes.vb /username:username /password:password /domain:domain
I then renamed the existing standard sdk output file in my project and added the file generated by using the above command. Then I built the project and began receiving numerous errors like so:
Public Property account_activity_parties As System.Collections.Generic.IEnumerable(Of ActivityParty)' has multiple definitions with identical signatures.
Any ideas why?
Well, I figured it out...and I'll post the solution here just in case anyone else runs into it. I renamed my original early bound entity class myorganizationcrmsdktypes-old.vb and left it in the project. Apparently the project was building from both files, and this was causing the duplication.
I'm trying to automate InstallShield from my build process, and I need to set a type 51 Custom Action's Property Value from my Release's Product Configuration Flags property. What is the syntax (something in square brackets?) to do that?
From here...
...to here:
You'll probably need to do a string replace on the InstallShield project to pull this off:
1) Under General Information | Project File Format, set the format to "XML", and save the project.
2) Next write a script to search the xml file for the name of your custom action, and replace the value with your Product Configuration Flags.
We've used this straightforward technique to change a number of properties at build time, including version numbers.
InstallShield also has an automation interface. FYI:
http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/IHelpAutoISWiProject.htm
For advanced developers, InstallShield
exposes a COM interface that allows
you to perform many of the same tasks
from a program, such as a Visual
Basic� executable, or a script, such
as a VBScript file in Windows
Scripting Host. By calling methods,
setting properties, accessing
collections, and so on, through the
automation interface, you can open a
project and modify its features and
component data in many of the same
ways that you would in the
InstallShield interface.
MSI Tip: Building Releases with the InstallShield Automation Interface
There's a bit of a learning curve, but once you've got it, it more reliable and robust than editing the XML file manually.
An ASP.NET project I am working on will be adding localization in the next version. As we pull text from our ASPX pages into resource files and other data into database tables, what tools might we want to evaluate to assist this process?
Are there any tools to assist translators to create the localization files?
Resource Refactoring Tool
alt text http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ResourceRefactoring&DownloadId=3748
Microsoft "open source" Visual Studio tool that integrates with the IDE. You can easily replace every occurrence of a string with a resource reference with a few clicks.
http://www.codeplex.com/ResourceRefactoring
Zeta Resource Editor
alt text http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ZetaResourceEditor&DownloadId=40997
A side by side editor for multiple resource file.
http://www.codeplex.com/ZetaResourceEditor/
See Resharper for localization -http://www.jetbrains.com/resharper/webhelp/Resources__Index.html
Also check “Creating a Data Driven ASP.NET Localization Resource Provider and Editor”
http://www.west-wind.com/presentations/wwdbresourceprovider/
It also includes DbResourceControl, that shows controls with Localizable attribute
From http://guysmithferrier.com/Downloads/Top10TipsI18NASPNET.pdf and
http://www.guysmithferrier.com/post/2009/05/Localizing-ASPNET-MVC.aspx
To convert your HTML controls to equivalent ASP.NET server side controls, look at the I18NRefactorings (an add-in for VS) in the download at http://www.dotneti18n.com/Downloads.aspx (folder VS2010/ASPNETSpecifics/I18NRefactorings/I18NRefactorings in the 2010 zip)that will help automate this process.
One tool I've found is RESX Synchronizer.
This is a command-line tool that synchronizes all of the keys between two resource files. For example:
resxsync homepage.resx homepage.fr-CA.resx
will copy all keys from the default .resx file to the French Canadian localization file.
Once that is done, it is only a matter of plugging in the French text.
May want to take a look at spring.net for localization (http://www.springframework.net/docs/1.2.0/reference/html/web.html#web-localization)
From the site
'Spring.Web supports several different approaches to localization within a web application, which can be mixed and matched as appropriate. Both push and pull mechanisms are supported, as well as the fallback to globally defined resources when a local resource cannot be found. Spring.Web also provides support for user culture management and image localization, which are described in the later sections.'