Devexpress (v21.2): Could not find assembly Npgsql (during using 'DevExpress ORM Data Model Wizard') - devexpress

The database is Postgresql and I wanted to use DevExpress ORM Data Model Wizard v21.2.
I got this error during the process:
Could not find assembly 'Npgsql'.
I have installed Npgsql already in my project module.
How can I fix it?

I have downloaded and installed npgsql.msi from this link:
https://github.com/npgsql/npgsql/releases/download/v4.1.8/Npgsql.msi
for more information:
https://www.npgsql.org/doc/installation.html

Related

ADO.Net in ASP.Net 5 MVC6?

I am trying to locate the Entity Data Model Wizard that allows you to populate the database schema into a DatabaseModel.edmx file so I can create my model based on that.
I've included the EntityFramework dlls into the project.json file but not too sure if in this new version of ASP.NET MVC this wizard is available anymore...
I've seen that the scaffolding that generates the Model classes is done through command line now but not sure if that has anything to do with the wizard I was talking about above.
Thanks!
"Prior to EF7 there are two ways to store models, in the xml-based EDMX file format or in code. Starting with EF7 we will be retiring the EDMX format and having a single code-based format for models."
Source: http://blogs.msdn.com/b/adonet/archive/2014/10/21/ef7-what-does-code-first-only-really-mean.aspx

EntityFramework 7 - CodeFirst - SQLite - Manage DB using ApplyMigrations at runtime

I am well on my way to utilizing EF7 CodeFirst with SQLite...but really want to employ DB Migrations at runtime. This is a desktop application (Click-once deployment) meant to sync with a main database when connection is available, and provide offline data when no connection is present.
I have pulled down the nuget pre-release versions and all is working, except I cannot find any documentation of how to apply the migrations at runtime. I can successfully Add-Migrations and manually Apply-Migrations...but need a way to programatically Apply-Migrations at runtime.
I've also browsed the EF7 open-source project, but could not get anywhere there.
Versions I'm using: Latest Pre-release as of 9/15/2015
EntityFramework.Sqlite v7.0.0-beta7
EntityFramework.Relational v7.0.0-beta7
EntityFramework.Commands v7.0.0-beta7
...et al...you get the picture.
I am asking for help to apply runtime migrations...or what is the documented/recommended path for programatically maintaining a local/embedded db using EF7 CodeFirst SQLite?
UPDATE:
I went back to EF6 with SQLite but then found out that there is not SQLMigrationGenerator for SQLite.
EDIT:
I believe ApplyMigrations() method referenced in one of the notes has been deprecated. Searching the repository, there is no reference to "ApplyMigrations".
Today you can invoke the extension method Migrate on the DatabaseFacade.
This method is only available when the using Microsoft.Data.Entity statement is present. It comes from the RelationalDatabaseFacadeExtensions class that is part of the EntityFramework.Relational package.
Still have to find out how to migrate up and down from the API.

Setup NodaTime under Asp.Net vnext

I've installed VS2015 CTP, created a vNext ConsoleApplication and would like to use NodaTime.
I've added the dependency like so:
"dependencies": {
"NodaTime": "1.3.1"
},
The package gets restored, but when I try to compile the solution, a warning arises:
Type NodaTime.Instant exists in the package: NodaTime 1.3.1, Supported frameworks: .NETFramework 3.5-Client;.NETPortable-net40+sl50+win+wpa81+wp80+MonoAndroid10+MonoTouch10+xamarinios10
The type is then simply not found by the compiler, telling me:
The type or namespace name 'NodaTime' could not be found (are you missing a using directive or an assembly reference?)
Any ideas on how to fix that? Could I also just add it as an dependency of the framework that it exists for?
Most existing packages will not support ASP.NET Core 5 yet; because of the significant differences, they need to be manually updated. If you're wanting to use NodaTime, you'll either need to stick to ASP.NET 5 (not Core) or wait for Jon Skeet to release a Core version.
ASP.NET 5 (not Core) will still let you use all the new functionality, though... except not cross platform.

ASP.NET and MySQL Connector Net

I am using latest version of MySQL connector Net to connect to a MySQL database from an ASP.NET form. I have copied the files MySql.Data.dll, MySql.Data.Entity.dll and MySql.Web.dll in the Bin folder of my ASP.NET application. Also I have imported required libraries using these lines:
Imports MySql.Data
Imports MySql.Data.MySqlClient
The image below shows the code and the error that I am getting:
What is wrong with the code please?
I have found a sample, this might help. Click HERE for example describes using ASP.NET/MySql.Data to connect to a MySQL Database.
No idea where dataset came from, should be database=dbherpes.

How to start using EntityFramework 4.1 (or 4.3 currently)

I've installed EntityFramework through nuget (should I do this for every project? Or can I just reference the assemblies? Where are they 'installed'? Sorry new to nuget)
I add a new "Ado.NET Entity Data Model" to my project and import tables from the database. However the context is added as ObjectContext not as the latest DbContext as I would presume. Am I missing something here?
Yes, install the package for each project. The assemblies are installed in a packages folder in the solution folder.
The ADO.NET Entity Data Model is for Database First. Read an explanation of Database First vs. Model First vs. Code First here:
http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
A great place to start is http://asp.net. Read the tutorials. They cover data access with EF for both WebForms and MVC.

Resources