Hi team
Im using entity framework and have this data type bool BIW, each time when try to access this data type its complaining must use correct format. Let me share my code
public ActionResult SaveValuesToDB() { TimeLineApplicationDBEntities1 bcontext = new TimeLineApplicationDBEntities1(); var tserver_stations = bcontext.CheckListTables.Select(t => t).ToList(); if (tserver_stations != null && tserver_stations.Count() > 0) { foreach (var data in tserver_stations) { Application_Check model = new Application_Check(); model.BVMS_PMON = data.BVMS_PMON; // How can this be corrected? cannot convert bool to a string //result.Add(model); } } bcontext.SaveChanges();
return RedirectToAction("ReturnList"); }
// Model
public class Application-Check {
public bool BIW { get; set; }
}