Beispiel #1
0
        public Task Delete(PurchaseLinesPost purchaselinesPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._purchaselinesRepository.RegisterDelete(purchaselinesPost);
            try
            {
                this._purchaselinesRepository.Commit();
            }
            catch (Exception ex)
            {
                this._purchaselinesRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.CompletedTask);
        }
Beispiel #2
0
        public Task <Int64> Create(PurchaseLinesPost purchaselinesPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._purchaselinesRepository.RegisterCreate(purchaselinesPost);
            try
            {
                this._purchaselinesRepository.Commit();
            }
            catch (Exception ex)
            {
                this._purchaselinesRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.FromResult(purchaselinesPost.ixPurchaseLine));
        }
 public void RegisterEdit(PurchaseLinesPost purchaselinesPost)
 {
     _context.Entry(purchaselinesPost).State = EntityState.Modified;
 }
 public void RegisterDelete(PurchaseLinesPost purchaselinesPost)
 {
     _context.PurchaseLinesPost.Remove(purchaselinesPost);
 }
 public void RegisterCreate(PurchaseLinesPost purchaselinesPost)
 {
     _context.PurchaseLinesPost.Add(purchaselinesPost);
 }