Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADO.Net in Asp.Net 5

When I use connection string builder in an ASP.Net 5 application I get this error:

Error CS0012 The type 'DbConnectionStringBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I'm using dnx451 as the framework, any sugestions?

like image 292
user2070369 Avatar asked Jul 14 '15 19:07

user2070369


People also ask

What is ADO.NET in C# example?

ADO.NET is a set of classes (a framework) to interact with data sources such as databases and XML files. ADO is the acronym for ActiveX Data Objects. It allows us to connect to underlying data or databases. It has classes and methods to retrieve and manipulate data.

What is ADO.NET explain with example?

ADO.NET provides an API for accessing database systems according to the programs. ADO.NET was created for the . NET framework and it can be said that they are the next generation of Active Data Objects (ADO). The . NET framework contains several namespaces and classes, which are developed to database access.

Can we use ADO.NET in .NET Core?

NET Core. So as long as you have a valid connection string to connect to your existing legacy database, you should be just fine.

What is ADO.NET in asp net?

ADO.NET is a set of classes that expose data access services for . NET Framework programmers. ADO.NET provides a rich set of components for creating distributed, data-sharing applications. It is an integral part of the . NET Framework, providing access to relational, XML, and application data.


1 Answers

Example project.json

"frameworks": {
        "dnx451": {
            "frameworkAssemblies": {
                "System.Data": "4.0.0.0"
            }
        },
        "dnxcore50": {
            "dependencies": {
                "System.Data.SqlClient": "4.0.0-beta-*"
            }
        }
    }
like image 129
Kiran Avatar answered Sep 28 '22 02:09

Kiran