public void Post([FromBody] Filter filter) { if (filter.Id == null || filter.Id == "") { filter.Id = ObjectId.GenerateNewId().ToString(); } _filterRepository.AddFilter(filter); }