var budget = new Budget{ AdditionalInformation = "Prueba de proforma super larga", CanGenerateInvoice = true, CreationDate = DateTime.Now, CustomerId = "I-1-A", Taxaction = new Tax("IVA España", 21),};
for (int i = 0; i < 1500; i++){ var line = new Line { Description = $"Línea {i + 1}" };
for (int j = 0; j < 100; j++) { var concept = new Line.Concept($"Concepto {j + 1} en línea {i + 1}", 9.49m); line.Concepts.Add(concept); }
budget.Lines.Add(line);}
await repository.AddAsync(budget, cancellation);await _transaction.CommitAsync(cancellation);return Ok($"Created ultra budget, ID: {budget.Id}");return await _session.Query<Budget>() .Where(budget => budget.Id == id) .Select(budget => new BudgetOutputModel { CanGenerateInvoice = budget.CanGenerateInvoice, Date = budget.CreationDate.Value, Taxaction = budget.Taxaction, AdditionalInformation = budget.AdditionalInformation, CustomerId = budget.CustomerId, Id = budget.Id.Substring(_collection.Length + 1), Lines = budget.Lines.Select(line => new BudgetLineModel { Description = line.Description, Concepts = line.Concepts.Select(concept => new BudgetConceptModel { Name = concept.Name, Amount = concept.Amount.Value }).ToList() }).ToList(), }).FirstOrDefaultAsync(cancellation);
![]() | Grisha Kotler Team Leader / Hibernating Rhinos LTD
|
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/76229952-2e16-4c9a-a209-bd4e2eac1558%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rav...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/6094dbca-624c-4cbb-aeec-3feedd83c788%40googlegroups.com.
Team Leader / Hibernating Rhinos LTD |
|
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/6094dbca-624c-4cbb-aeec-3feedd83c788%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/5d89a0a6-b3fa-4d15-b85c-f5ed1e2df74bn%40googlegroups.com.
![]() | Egor Developer / Hibernating Rhinos LTD |