My question here is, is this possible?
Of course it is possible. With one exception: MVC without models is not MVC :-) This is a VC that I personally have never heard of. Neither as a design template, nor as a structure. Sounds more like (WC: -))
What is the difference in performance between both ways?
You cannot get anything faster than the original ADO.NET. So yes, it will be faster compared to using ORM.
Of course, you will have to write a lot more code, as you will still have models to match the results with your queries. Do not think that the fact that you are not using EF relieves you of responsibility for using models. Also do not think that you will use DataTables.
Thus, you will have your data level with these models. The only difference will be in the implementation.
Take an example.
Define a model that will represent your business entity that you intend to work with in your application:
public class Person { public int Id { get; set; } public string Name { get; set; } public int Age { get; set; } public DateTime Dob { get; set; } }
then define a data access agreement (aka operations that you are ready to perform with your model):
public interface IPeopleRepository { IEnumerable<Person> Get(); ... other operations you want to perform with this model }
then you could execute your implementation:
public class ADOPeopleRepository: IPeopleRepository { public IEnumerable<Person> Get() { string connectionString = ...; using (var conn = new SqlConnection(connectionString)) using (var cmd = conn.CreateCommand()) { conn.Open(); cmd.CommandText = "SELECT id, name, age, dob FROM people"; using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { yield return new Person { Id = reader.GetInt32(reader.GetOrdinal("id")), Name = reader.GetString(reader.GetOrdinal("name")), Age = reader.GetInt32(reader.GetOrdinal("age")), Dob = reader.GetDateTime(reader.GetOrdinal("dob")), }; } } } } ... implementation of the other operations you want to perform with this model }
and then, as usual, you can have a controller to work with this repository:
public class PeopleController: Controller { private readonly IPeopleRepository repository; public PeopleController(IPeopleRepository repository) { this.repository = repository; } public ActionResult Index() { var people = this.repository.Get().ToList();
All that remains now is to register a specific ADOPeopleRepository implementation of your data access level in your favorite container.
See how things get layered. Now that you have written your ASP.NET application correctly, you probably already have the models, interface, and repository implementations. Therefore, porting it to ASP.NET MVC will be part of the cake, where all you have to do is write a couple of models and views.