public void TestAdd() { var id = 0; _provider.ContextAction(c => { var item = _repo.AddOrUpdate(c, _createItem()); id = item.Id; _repo.DeleteAll(c); }); Assert.AreNotEqual(0, id); }
public IList <TResult> Where <TResult>(string sql) { var result = default(List <TResult>); _povider.ContextAction(c => { result = c.Query <TResult>(sql).ToList(); }); return(result); }