Linq select and put to list together
await (from invoiceextraitems in uow.Context.VehicleWashInvoiceExtraItem join extraitem in uow.Context.ExtraItem on invoiceextraitems.ExtraItemId equals extraitem.Id where invoiceextraitems.TenantId == request.TenantId && invoiceextraitems.InvoiceId == request.Item && invoiceextraitems.RecordState == Enums.RecordStatus.Active select new { extraitem.Name, invoiceextraitems.NetAmount, invoiceextraitems.IsTaskComplete, invoiceextraitems.Id, }).AsNoTracking().AsQueryable(). Select(p => new VehicleWashCheckList { Name = p.Name, Amount = p.NetAmount, IsComplete = p.IsTaskComplete, Id = p.Id, IsPrimary = false
No comments:
Post a Comment