public void DeleteSuccess() { var model = new GetModelService().GetModel(); _client.Add(model); Assert.Equal(1L, _client.Delete(model)); }
public void Add() { var model = new GetModelService().GetModel(); _client.Add(model); var result = _client.GetQueryable <TestModel>().FirstOrDefault(p => p.Id == model.Id); Assert.NotNull(result); Assert.Equal(model.ToJson(), result.ToJson()); }
public void UpdateSuccess() { var model = new GetModelService().GetModel(); _client.Add(model); model.Int = 199; model.String = Guid.NewGuid().ToString(); model.DateTimeUtc = DateTime.UtcNow; _client.Update(model); var result = _client.GetQueryable <TestModel>().FirstOrDefault(p => p.Id == model.Id); Assert.Equal(model.ToJson(), result.ToJson()); }
public void Add(ArticleCategory article) { _client.Add(new ArticleCategoryEntity(article)); }
public void Add(Article article) { _client.Add(new ArticleEntity(article)); }
public void Add(Order order) { _mongoClient.Add(Convert(order)); _cache.Add(order.Id, order); }