Interface IDeleteFeatures
Defines a command that deletes one or more features in a Feature Source based on some filtering criteria
Namespace: OSGeo.MapGuide.MaestroAPI.Commands
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IDeleteFeatures : IFeatureCommand, ICommand
Remarks
This command is only supported on certain implementations of IServerConnection You can find out if the connection supports this command through the Capabilities
Examples
How to update all features matching a given filter to the given value
IServerConnection conn = ...;
IDeleteFeatures deleteCmd = (IDeleteFeatures)conn.CreateCommand((int)CommandType.DeleteFeatures);
deleteCmd.FeatureSourceId = "Library://My.FeatureSource";
deleteCmd.ClassName = "MyFeatureClass";
deleteCmd.Filter = "Name = 'Bar'";
int deleted = deleteCmd.Execute();
Properties
| Improve this Doc View SourceFilter
Gets or sets the filter that determines what features will be deleted. If empty, this will delete all features
Declaration
string Filter { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceExecute()
Executes the command.
Declaration
int Execute()
Returns
Type | Description |
---|---|
System.Int32 | The number of features deleted |