title: SQL Server - Records being deleted randomly?
body: <p>I have an ASP.NET MVC app I've developed for a client. MVC 5, EF 6. </p>
  
  <p>The web server and db server are separate. All of a sudden a bunch of data was deleted from the db server. Users were performing no delete functions. Is there any scenario that would cause this? The records seem to be random. No stored procs, triggers, etc.... running. The app was working fine for months. Any scenario where SQL Server (2014 version) would delete records in a table? No errors were displayed to the user.</p>
  
  <p>**** UPDATE ****</p>
  
  <p>The only "delete" related code that I rolled out recently was this...</p>
  
  <pre><code>   [Authorize]
      public class WorkResultsController : Controller
      {
          private readonly ABC_WorkingContext db = new ABC_WorkingContext();
  
          public ActionResult DeleteEvent(int id, bool? performRedirectAfterDelete = true)
          {
              if (!WorkFormServices.IsEditOrDeleteEnabled(id)) return this.HttpNotFound();
  
              var @event = this.db.Events.Find(id);
  
              try
              {
                  // first remove any Work questions related to this event
                  var WorkResultsToDelete = this.db.WorkResults.Where(e =&gt; e.EventId == id).ToList();
                  foreach (var row in WorkResultsToDelete) this.db.WorkResults.Remove(row);
  
                  this.db.Events.Remove(@event);
                  this.db.SaveChanges();
  
                  if (performRedirectAfterDelete == true) return this.RedirectToAction("Index", "WorkScheduler");
                  return this.Json(
                      new { success = true, responseText = "Delete success!" },
                      JsonRequestBehavior.AllowGet);
              }
              catch (Exception)
              {
                  return this.Json(
                      new { success = false, responseText = "Delete failed!!" },
                      JsonRequestBehavior.AllowGet);
              }
          }
  </code></pre>
  
  <p>I want to delete only WorkResults records related to the specific ID. So, I believe this is working correctly. Do you see any unintended deletes that could happen?</p>