Closed boiss-dev closed 4 years ago
Hi, yes you can use the Projection methods.
Tests for usage example can be seen here:
[Fact]
public async Task ProjectOneAsync()
{
// Arrange
var someContent = GetContent();
var someDate = DateTime.UtcNow;
var document = CreateTestDocument();
document.SomeContent = someContent;
document.Nested.SomeDate = someDate;
SUT.AddOne<T>(document);
// Act
var result = await SUT.ProjectOneAsync<T, MyTestProjection>(
x => x.Id.Equals(document.Id),
x => new MyTestProjection
{
SomeContent = x.SomeContent,
SomeDate = x.Nested.SomeDate
},
PartitionKey);
// Assert
Assert.True(null != result, GetTestName());
Assert.True(someContent == result.SomeContent, GetTestName());
Assert.True(someDate.Minute == result.SomeDate.Minute, GetTestName());
Assert.True(someDate.Second == result.SomeDate.Second, GetTestName());
}
cool ! I will test that. thanks for your support
works like a charm. thanks a lot
Hello, first of all congrats for your great work.
is it possible to do something like select Name, Color from Cars;
instead of select * from Cars;
thanks.