Hi all,
In my project i have user type table in which i stored only 2 ids
UserType Table
Usertype id Name
3 Customer User
5 Business User
I need to set that 2 ids in the web. congif file in my MVC project . While coming in code we need to call that from web.config file. Is it possible to do
I hardcoded the value in the below code
public ActionResult Calendar(int id)
{
var cal = (from s
in db.tblUsers
where s.UserTypeId == 5 && s.UserID == id
select new Appt
{
FirstName = s.FirstName,
BusinessCategory = s.tblBusinessCategory.BusinessCategory,
BusinessName = s.tblBusinessCategory.BusinessName,
StartTime = s.WorkingHour.StartTime,
UserTypeID =5,
UserID = s.UserID
}).FirstOrDefault();
Session["BUId"] = id;
return View(cal);
}
in that usertype id we need the get the value from web.config
Can anyone please help me . thanks in advance