Esempio n. 1
0
        // CRUD
        public bool Add(Client model)
        {
            try
            {
                _persistenceDbContext.Add(model);
                _persistenceDbContext.SaveChanges();
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        //CRUD
        public bool Add(Supplier model)
        {
            try
            {
                _persistenceDbContext.Add(model);
                _persistenceDbContext.SaveChanges();
            }
            catch (Exception)
            {
                return false;
            }

            return true;
        }
Esempio n. 3
0
        public bool CommitDapper()
        {
            var changeAmount = _context.SaveChanges();

            return(changeAmount > 0);
        }