static void Main(string[] args) { try { using (var db = new IssuesContext()) { var list = new List<Issue>(); using(IIssueRepository repos = new IssueRepository()) { list = repos.GetCollection<Issue>().Where(arg => arg.Title == "userstory123").ToList(); foreach(var iss in list) { repos.Remove(iss); } var f3123 = repos.GetCollection<Issue>(); var us2 = repos.GetById<Userstory>(Guid.NewGuid()); repos.Remove(us2); repos.UpdateTitle<Userstory>(Guid.NewGuid(), "newuserstory"); } } } catch (Exception e) { Console.WriteLine(e.Message); } }