Example #1
0
        public Task <bool> Delete(int id)
        {
            try
            {
                var item = _itemPersist.GetItemById(id);
                if (item == null)
                {
                    throw new Exception("O item para o delete não foi encontrado");
                }

                _geralPersist.Delete(item);
                return(_geralPersist.SaveChangesAsync());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }