Private BookingDB db = new BookingDB();
Private MonthDb mdb = new MonthDB();
String date = (booking.Start_Date).ToString();
var check = from b in mdb.months
if (check != null)
booking.Reservation_Owner = User.Identity.Name;
//Add booking.Start_Date to mdb.Entry(check).BookedDays
I've got this code that on creation of a new booking, will check that no exisiting bookings have already been made on or around that specific day. if the day to be booked is not already been booked (ie exists under BookedDays in mdb.months) then i wish to add the Start_Date of the booking, to the BookedDays string in the mdb.months database (the mdb.month database is just a list of the 12 months)
at first i tried using mdb.Entry() to add to that specific month instance, however i cannot get it to work.
the error is:
the model does not have a definition for BookedDays
what to do?