public async Task Update(string id, IFeatureToggleModel model)
        {
            model.Id = id;

            var concreteModel = new MongoDbFeatureToggleModel(model);

            await _featureToggles.ReplaceOneAsync(ft => ft.Id == id, concreteModel);
        }
        public async Task <IFeatureToggleModel> Create(IFeatureToggleModel model)
        {
            var concreteModel = new MongoDbFeatureToggleModel(model);

            if ((await _featureToggles.FindAsync(ft => ft.Name == model.Name)).Any())
            {
                throw new DuplicateFeatureToggleNameException(model.Name);
            }

            await _featureToggles.InsertOneAsync(concreteModel);

            return(concreteModel);
        }