public int UpdateTraningDetails(tblTrainingLocation obj) { var result = (from s in db.tblTrainingLocations where s.LocationId == obj.LocationId select s).SingleOrDefault(); TraningLocDO objNew = new TraningLocDO(); objNew.LocationId = obj.LocationId; objNew.LocationName = obj.LocationName; objNew.TrainingLocCode = obj.TrainingLocCode; objNew.ClsRoomCapacity = Convert.ToInt32(obj.ClsRoomCapacity); objNew.NoOfRooms = Convert.ToInt32(obj.NoOfRooms); objNew.Descriptions = obj.Descriptions; objNew.StateId = Convert.ToInt32(obj.StateId); objNew.City = obj.City; objNew.Address = obj.Address; if (db.SaveChanges() > 0) { return(1); } else { return(-1); } }
public int UpdateTraningDetails(tblTrainingLocation obj) { TraningLocDAL objDAL = new TraningLocDAL(); return(objDAL.UpdateTraningDetails(obj)); }