title: cannot implicitly convert type system.data.entitystate to system.data.entity.entitystate(are you missing a cast?)
body: <p>I have recently done some update in visual studio and this error started happening, I am really new to MVC and I am not sure what caused this error.</p>
  
  <pre><code>    using System;
      using System.Collections.Generic;
      using System.Data;
      using System.Linq;
      using System.Web;
      using SystemInformation.BookedEvent.Interfaces;
      using SystemInformation.DBModel;
  
      namespace SystemInformation.BookedEvent.Repository
      {
       public class BookedEventRepository : IBookedEventRepository
          {
           public void UpdateBooking(IEnumerable&lt;DBModel.BookedEvent&gt; bookings)
              {
          foreach (var booking in bookings)
          {
              var record = new DBModel.BookedEvent
                               {
                                   ID = booking.ID,
                                   UserID = booking.UserID,
                                   EventID = booking.EventID,                                  
                                   DateBooked = booking.DateBooked,
                                   Trainer = booking.Trainer,
                                   Date = booking.Date,
                                   EndDate = booking.EndDate,
                                   Attended = true
                               };
               _context.Entry(record).State = System.Data.EntityState.Modified;
              }
          }
      }
  </code></pre>