все
This commit is contained in:
parent
80afc49285
commit
ad38f7d6f5
@ -18,7 +18,7 @@ namespace BeautySaloonNoSQLDatabaseImplement
|
||||
public int Id { get; set; }
|
||||
|
||||
[BsonElement("date")]
|
||||
private DateTime DateMongo { get; set; }
|
||||
public DateTime DateMongo { get; set; }
|
||||
[BsonIgnore]
|
||||
public DateOnly Date {
|
||||
get
|
||||
|
@ -233,18 +233,18 @@ namespace BeautySaloonView
|
||||
}*/
|
||||
//var result = _OLogic.ReadList(null)?.OrderByDescending(x => x.Date).OrderBy(x => x.Sum).ToList();
|
||||
var source = MongoDBContext.GetInstance();
|
||||
var users = (from o in source.Orders.AsQueryable()
|
||||
join c in source.Clients.AsQueryable() on o.ClientId equals c.Id
|
||||
join em in source.Employees.AsQueryable() on o.EmployeeId equals em.Id
|
||||
var users = (from o in source.Orders.Find(new BsonDocument()).ToList().AsQueryable()
|
||||
join c in source.Clients.Find(new BsonDocument()).ToList().AsQueryable() on o.ClientId equals c.Id
|
||||
join em in source.Employees.Find(new BsonDocument()).ToList().AsQueryable() on o.EmployeeId equals em.Id
|
||||
where em.PositionName == "Продавец"
|
||||
orderby o.Date descending, o.Sum descending
|
||||
orderby o.DateMongo descending, o.Sum descending
|
||||
select new
|
||||
{
|
||||
Id = o.Id,
|
||||
Client = c.Name + ' ' + c.Surname + ' ' + c.Patronymic,
|
||||
Seller = em.Name + ' ' + em.Surname + ' ' + em.Patronymic,
|
||||
Position = em.PositionName,
|
||||
Date = o.Date,
|
||||
Date = o.DateMongo,
|
||||
Sum = o.Sum
|
||||
}).ToList();
|
||||
stopwatch3.Stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user