예제 #1
0
 public ICallistoInsertOne <Person> CreateInsertOperation(CreatePersonCommand createPersonCommand)
 {
     _logger.LogInformation("Creating callisto operation object");
     return(_insertOperationFactory.CreateInsertOne((Person)createPersonCommand));
 }
예제 #2
0
 /// <summary>
 /// Insert one document into the collection.
 /// </summary>
 /// <param name="entity">Entity to be inserted</param>
 /// <returns>The inserted entities with id</returns>
 /// <exception cref="NullCallistoOperationException">When <see cref="ICallistoInsertOne{T}"/> is null</exception>
 /// <exception cref="NullOrEmptyValueException">When the values array is null or empty</exception>
 ///
 public async Task <TEntity> One(TEntity entity)
 {
     return(await One(_factory.CreateInsertOne(entity)));
 }