public void Reset()
        {
            var existingState
                = Entities.AcumaticaBatchStates.FirstOrDefault();

            if (existingState != null)
            {
                Entities.AcumaticaBatchStates.Remove(existingState);
            }

            var newState = new AcumaticaBatchState();

            Entities.AcumaticaBatchStates.Add(newState);
            Entities.SaveChanges();
        }
        public AcumaticaBatchState Retrieve()
        {
            var output =
                _dataContext
                .Entities
                .AcumaticaBatchStates.FirstOrDefault();

            if (output == null)
            {
                var newState = new AcumaticaBatchState();
                Entities.AcumaticaBatchStates.Add(newState);
                return(newState);
            }
            else
            {
                return(output);
            }
        }