Connect to a MySQL database from Visual Studio 2017
As of today weI can connect to a MySQL database, but cannot generate the Entity Data Model from a MySQL database in Visual Studio 2017 To access a MySQL database from Visual Studio 2017 IMPORTANT: First install MySQL for Visual Studio, and after that…
Generate Entity Framework Entity Data Model in Visual Studio 2017
Visual Studio 2017 has many project type options, and not all of them support the Entity Framework user interface to generate the Entity Framework Data Model (EDMX) file. If you create an ASP.NET Web Application(.NET Framework) you can add the EDMX file…
{“error”:”Entity type ‘AspNetUserRoles’ has composite primary key defined with data annotations. To set composite primary key, use fluent API.”}
When a database table has composite keys (multiple columns are in the key) you cannot use the usual key definition [Key] [Display(Name = “UserId”)] public string UserId { get; set; } [Key] [Display(Name = “RoleId”)] public string…
Generate SQL script from Entity Framework migration script
It is not recommended to execute Entity Framework migration scripts in production, It is important that you execute all SQL steps manually on the production database section-by-section to immediately see the result and be able to recover in case a…
DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded.
The .NET Core Entity framework makes database access easy. When you auto-generate a Razor page in a .NET web application to edit a data row, the scaffolding places controls on the page for every column. There are columns in most of the tables that we…
java.lang.NoClassDefFoundError, java.lang.ClassNotFoundException
When you add a dependency reference to a Java project, it may compile without any errors, but runtime you may get an error message similar to this: HTTP Status 500 – Internal Server Error Type Exception Report Message An exception occurred processing JSP…
Java Spring MVC web application configuration in NetBeans 8
When you create a Java Spring MVC web application or make changes to an existing one, it is important to know the location of configuration values. Java package name The Java package name is stored in Every .java file package MY_PACKAGE_NAME pom.xml file…
org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
This error can happen on Linux and Windows, and the cause could be the same. On Windows Server 2012R2 I opened a command prompt. To be able to delete a directory from the Tomcat webapps folder, I have issued the shutdown command. When I started the…
Only persistence units with transaction type JTA can be used as a container managed entity manager
NetBeans can use multiple deployment servers. When your web application uses the Entity Framework and you select the Glassfish server as the deployment server, you can get the error message when you try to run your application in the IDEÉ Severe:…
Install Git on Windows
If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub Configure Git for Windows Enable Page Up and Page Down Set up Git Bash to…