Esempio n. 1
0
        public async Task <Either <Error, InvoiceHeader> > FindByAsync(params object[] valuesKeys)
        {
            var result = await base.FindAsync(valuesKeys);

            if (result is null)
            {
                return(Error.New("No Invoice Found"));
            }

            _context.Entry(result).Reference(c => c.Client).Load();
            _context.Entry(result).Reference(c => c.PaymentTerm).Load();
            _context.Entry(result).Collection(c => c.InvoiceDetails).Load();

            return(result);
        }
Esempio n. 2
0
 public T GetSavedEntry(T entity)
 {
     _context.Entry(entity).GetDatabaseValues();
     return(entity);
 }