i want to develop a big application using MVC4(this is suggested by most of people as its new and have more features) and EF.
I am pretty sure that i will have more than 100 tables and more than 50,000 records in each table so mostly i am concern with speed of application.i will search in above data.
Now questions are
1- should i use DBFirst or CodeFirst or what other?
2-which one would be fast running.i need speed.
3- how to avoid server controls/use to improve speed.
Please note that i am using EF in dotnet.
Now what i was using till now to develop an application in webforms.please check my below code and tell me can i do it in MVC?
$.ajax({
type: 'POST',
url: 'Default.aspx/GetGenCategories',
data: "{}",
contentType: 'application/json; charset=utf-8',
dataType: 'json',
success: function (msg) {
var table = '<thead><tr><th></th></tr></thead><tbody>';
//loop each record
for (var i = 0; i < msg.d.length; i++) {
table += '<tr><td class="text16size_hyper">' + msg.d[i].CategoryName + '</td></tr>';
}
table += '</tbody>';
$('#gen_Cat').html(table).dataTable();
}
});
now on code page i have this
[System.Web.Services.WebMethod()]
[System.Web.Script.Services.ScriptMethod()]
public static List<clsGeneral> GetGenCategories()
{
//make object of city class
clsGeneral cl = new clsGeneral();
return cl.GetGenCategories();
}
amd here is my class
public List<clsGeneral> GetGenCategories()
{
try
{
Database db = DatabaseFactory.CreateDatabase();
DbCommand oCmd = db.GetStoredProcCommand("SP");
DataSet dsResult = db.ExecuteDataSet(oCmd);
var query = from o in dsResult.Tables[0].AsEnumerable()
select new clsGeneral
{
Cat_id = o.Field<int>("Cat_id"),
CategoryName = o.Field<string>("CategoryName")
};
List<clsGeneral> lstDisplay = new List<clsGeneral>();
lstDisplay.AddRange(query);
return lstDisplay;
}
..........