mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2026-06-04 23:54:34 +00:00
Improved sample reporting
This commit is contained in:
@@ -7,6 +7,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace BasicSample
|
namespace BasicSample
|
||||||
@@ -116,7 +117,6 @@ namespace BasicSample
|
|||||||
};
|
};
|
||||||
|
|
||||||
dbContext.Users.Add(user);
|
dbContext.Users.Add(user);
|
||||||
|
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
|
|
||||||
var query = dbContext.Users
|
var query = dbContext.Users
|
||||||
@@ -125,9 +125,11 @@ namespace BasicSample
|
|||||||
x.TotalSpent
|
x.TotalSpent
|
||||||
});
|
});
|
||||||
|
|
||||||
Console.WriteLine(query.ToQueryString());
|
var result = query.FirstOrDefault();
|
||||||
|
|
||||||
var r1 = query.ToArray();
|
Console.WriteLine($"Our user {result.Name} spent {result.TotalSpent}");
|
||||||
|
Console.WriteLine($"We used the following query:");
|
||||||
|
Console.WriteLine(query.ToQueryString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user