how can i open db connection in global asax file. For example i am trying to open in
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using EDefterWAP.Helpers;
using EDocSis.DAL;
using System.Configuration;
namespace EDefterWAP
{
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_EndRequest()
{
IEDefterDB db = DBContext.CreateInstance(ConfigurationManager.ConnectionStrings["EDocSis.DAL.EDefterDB"].ConnectionString);
db.KurumVeriAktarimlari.
}
i can't write where condition after db.KurumVeriAktarimlari ? What is the problem?
It looks like you are missing a using statement.
This assembly contains the information for the Where(), First(), etc lambdas.