ASP.NET Boilerplate Framework with ADO.NET - aspnetboilerplate

How to use ADO.NET with the multi tenant application. I would like to to use ado.net with SQL server. please advise if there are any samples.

Just create a custom repository and use SQL inside it.
Check this article for more: http://www.aspnetboilerplate.com/Pages/Documents/Articles/Using-Stored-Procedures,-User-Defined-Functions-and-Views/index.html
It also uses SP and views.

Your choices are:
EF Core
EF
Dapper
NHibernate
If performance is top priority for you Dapper may be of interest.

Related

Confused with Ado .net, Entity Framework,LINQ

I know ASP .Net and ADO .NET But I am really confused with this Entity Framework and LINQ.
Can We Use Entity Framework to Interact with Db without like ADO .NET.Are all these three (ADO ,Entity framework,LINQ) is alternative to each other ?
Please guide
Here is my best explanation (after hours of confusion!):
ADO.NET = Part of the .NET framework enabling you to easily access data and data services like Microsoft SQL Server
LINQ (Language-integrated query) = Enables you to query data from within .NET programming languages
LINQ has been integrated in various areas of the .NET framework including:
LINQ to Objects
LINQ to XML
LINQ to ADO.NET
LINQ to ADO.NET = enables you to query over any enumerable object in ADO.NET by using LINQ
There are 3 LINQ to ADO.NET technologies:
LINQ to DataSet = enables you to write queries against the DataSet (a class that represents an in-memory version of a DB)
LINQ to SQL = enables you to write OO queries in your .NET project that targets SQL databases. It translates LINQ queries into SQL statements. This is no longer supported by Microsoft due to the great overlap in functionality with the Entity Framework (EF).
LINQ to Entities = Almost anything you can do in LINQ to SQL can be done in LINQ to Entities. Enables developers to write queries against the Entity Framework(EF) conceptual model using VB or C#.
EF is an Object Relational Mapper (ORM) that supports the development of data-oriented software applications. With EF, you can take a bunch of database objects like tables and turn them into .NET objects that you can access in your code. You can then use these objects in queries or use them
directly in data-binding scenarios. EF also enables you to do the reverse: design an object model first and then left EF create the necessary database structure for you.
Source: Beginning ASP.NET 4.5.1, Microsoft Documentation
I assume that by LINQ you actually mean LINQ to SQL.
EF (Entity Framework) and L2S (LINQ to SQL) are object-relational
mappers that use ADO.NET internally, encapsulating most of its functionality. So if you use either, you'd still be using ADO.NET.
All three are viable options for building the data access layer or your code, with their own strengths and weaknesses. Have a look at this post for more info:
Entity Framework VS LINQ to SQL VS ADO.NET with stored procedures?

does entity framework supports oracle database?

I am want to start a new project using entity framework 6. I have decided to use Database First approach. I want to know if it is possible to use Oracle database for my new project with entity framework?
It's not a matter of Entity Framework supporting Oracle. It's the other way around. Entity Framework supports any data source, as long as a provider is written for it. You need to install an Oracle provider with EF support. If I'm not mistaken, the latest version of ODP.NET, which is downloadable from Oracle, has EF support. It will generate a model from a database but whether it will go the other way, I don't know.
Yes it possible. And here you can find a tutorial about it from Oracle .

Is Oracle NOW fully supported by .NET entity framework?

I was having trouble finding a path/resource to the query if oracle is supported by Entity framework.
If it does ... which of the following Workflows does it support?
Model First
Database First
Code first(new database)
Code first (Existing database)
Kindly also mention the resource where I can learn Entity framework that has support for oracle.

ASP.NET MVC developing using an ORM

When developing with MVC with an ORM
I dont like the idea that the ORM will make changes in my DB.
My application is a data driven application and the DB is the the first thing i created.
Isn't that an overhead to maintain the data scheme both in the model and in the DB?
How do i manage it?
Any ORM that is more suitable to this kind of work method?
I dont like the idea that the ORM will make changes in my DB
ORM don't have to make any changes in your database structure. If you have existing database you can simply use it without requiring any automated changes.
Isn't that an overhead to maintain the data scheme both in the model and in the DB?
How do you want to present your data in MVC? Are you going to use classes representing your data from the database? If yes then you have a reason why ORM exists. ORM maps relational data from database to classes = it loads them for you and persists them for you (= you don't have to deal with database access and SQL). If you are going to use object oriented strongly typed approach then ORM will not be overhead for you.
If you are not going to use such approach you don't have to use MVC. Just use ASP.NET with SQL data sources or ASP.NET dynamic data.
Any ORM that is more suitable to this kind of work method?
You have no special method.
Almost every ORM has some support tools or extensions which allows you creating basic mapping and sometimes also classes from existing database. In EF you will simply add Entity Data model to your project and in wizard selects tables you want in your application.
Sure the last paragraph was simplified. Each ORM has learning curve and its specialties so it will not be so "simple".
For .NET 4 Entity Framework, the tooling let's you go both directions; generate a database from a model and generate a model from a database. These features give you flexibility when implementing your change management protocols. I'm not sure what options are available for NHibernate.
Entity Framework references:
http://msdn.microsoft.com/en-us/library/bb386876.aspx
http://msdn.microsoft.com/en-us/library/bb399249.aspx
http://www.simple-talk.com/dotnet/.net-framework/entity-framework-4460---learn-to-create-databases-from-the-model/
A Stackoverflow comparison of the two:
Deciding between NHibernate vs Entity Framework?

Create Custom Membership Provider (Entity Framework vs Linq)

I'm starting work on a Custom Membership provider and I was wondering which option would be the best to develop this application in Linq or Entity Framework?
Also I have a need to link two table from different database via a common ID and I was wondering does anyone know of any good tutorials about creating a MVC 3 Web Application that uses either Linq or Entity Framework to do this.
From my research Entity Framework seems to be the best method suited to my situation but I would appreciate some advice / confirmation that this correct and a little direction to a tutorial is possible?
By Linq, you mean Linq to SQL vs. Entity framework? If so, then I would recommend using Entity Framework. Microsoft's development on Linq to SQL has virtually stopped so EF has a better future.
NerdDinner is one of the more popular tutorial applications that uses ASP MVC 2 and entity framework. ASP MVC 2 is similar enough to get started with the basic concepts. Here is a good walk through tutorial:
http://nerddinnerbook.s3.amazonaws.com/Intro.htm
The code itself is freely available:
http://nerddinner.codeplex.com/

Resources