public async Task <bool> Create(FuelTankState entity)
        {
            if (entity == null)
            {
                return(false);
            }

            entity.CreationDate = DateTime.Now;
            entity.UpdateDate   = DateTime.Now;
            entity.Active       = true;

            await _dbContext.AddAsync(entity);

            var result = await _dbContext.SaveChangesAsync();

            return(result > 0);
        }
        public async Task <bool> Update(FuelTankState entity)
        {
            if (entity == null)
            {
                return(false);
            }
            var entityToChange = await GetSingleById(entity.Id);

            if (entityToChange == null)
            {
                return(false);
            }
            entityToChange.Description = entity.Description;
            entityToChange.UpdateDate  = DateTime.Now;
            _dbContext.FuelTankStates.Update(entityToChange);
            var result = await _dbContext.SaveChangesAsync();

            return(result > 0);
        }