Show / Hide Table of Contents

Class ServiceGeodatabase

A container for a collection of ServiceFeatureTable connected to a feature service.

Inheritance
object
ServiceGeodatabase
Implements
ILoadable
ISharedTemplateSource
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Esri.ArcGISRuntime.Data
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class ServiceGeodatabase : ILoadable, ISharedTemplateSource
Remarks

A ServiceGeodatabase connects to a feature service as a whole, grouping together ServiceFeatureTable instances for related records queries, connecting to a version in a branch-versioned service, and managing edits for all tables.

This grouping is exposed through ConnectedTables. The collection includes tables that are loaded from the same web map and feature service, or created by calling GetTable(long). Tables created directly with ServiceFeatureTable constructors are standalone and are not grouped with a ServiceGeodatabase.

When a ServiceGeodatabase is created from a portal item or URL, ConnectedTables is initially empty. To populate it, use ServiceInfo with LayerInfos or TableInfos, and call GetTable(long).

Constructors

Name Description
ServiceGeodatabase(PortalItem)

Initializes a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to the default version in the feature service.

ServiceGeodatabase(PortalItem, FeatureServiceSessionType)

Initializes a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to the default version in the feature service.

ServiceGeodatabase(PortalItem, string)

Initializes a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to a specific version in the feature service.

ServiceGeodatabase(PortalItem, string, FeatureServiceSessionType)

Initializes a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to a specific version in the feature service.

ServiceGeodatabase(Uri)

Initializes a new instance of the ServiceGeodatabase class connected to the default version in a feature service.

ServiceGeodatabase(Uri, FeatureServiceSessionType)

Initializes a new instance of the ServiceGeodatabase class connected to the default version in a feature service.

ServiceGeodatabase(Uri, string)

Initializes a new instance of the ServiceGeodatabase class connected to a specific version in a feature service.

ServiceGeodatabase(Uri, string, FeatureServiceSessionType)

Initializes a new instance of the ServiceGeodatabase class connected to a specific version in a feature service.

Properties

Name Description
ConnectedTables

Gets the collection of feature tables managed by the ServiceGeodatabase.

DefaultVersionName

Gets the name of the default version.

LoadError

Gets the exception associated with a failed load. This property remains null if load is successful.

LoadStatus

Gets the current load status.

PortalItem

Gets the PortalItem which the ServiceGeodatabase was created from.

ServiceInfo

Gets the metadata of the service this ServiceGeodatabase is connected to.

SessionType

Gets or sets the type of read and edit sessions to use when working with the service.

SupportsBranchVersioning

Gets a value indicating whether the service supports branch versioning.

Uri

Gets the URL of the feature service or the portal item to connect to.

VersionName

Gets the name of the version the ServiceGeodatabase is currently connected to.

Methods

Name Description
AddFeaturesAsync(SharedTemplateFeatureCreationSet, CancellationToken)

Adds a set of features created from a shared template to the database.

ApplyEditsAsync()

Applies all local edits in all tables to the service.

ApplyEditsAsync(CancellationToken)

Applies all local edits in all tables to the service.

CancelLoad()

Cancel the previous load operation.

CloseAsync()

Closes this service geodatabase.

CreateAsync(PortalItem)

Creates a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to the default version in the feature service.

CreateAsync(PortalItem, FeatureServiceSessionType)

Creates a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to the default version in the feature service.

CreateAsync(PortalItem, string)

Creates a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to a specific version in the feature service.

CreateAsync(PortalItem, string, FeatureServiceSessionType)

Creates a new instance of the ServiceGeodatabase class from a feature service portal item, and connects to a specific version in the feature service.

CreateAsync(Uri)

Creates a new ServiceGeodatabase connected to the default version in a feature service.

CreateAsync(Uri, FeatureServiceSessionType)

Creates a new ServiceGeodatabase connected to the default version in a feature service.

CreateAsync(Uri, string)

Creates a new ServiceGeodatabase connected to a specific version in a feature service.

CreateAsync(Uri, string, FeatureServiceSessionType)

Creates a new ServiceGeodatabase connected to a specific version in a feature service.

CreateFeaturesAsync(SharedTemplate, Geometry?, CancellationToken)

Creates a set of features based on the specified shared template and geometry.

CreateVersionAsync(ServiceVersionParameters)

Asynchronously creates a new version in the service based on the default version.

CreateVersionAsync(ServiceVersionParameters, CancellationToken)

Asynchronously creates a new version in the service based on the default version.

GetTable(long)

Returns a service feature table object from the ID of a layer or table in the service.

GetVersionsAsync()

Asynchronously retrieves a list of all versions on the service.

GetVersionsAsync(CancellationToken)

Asynchronously retrieves a list of all versions on the service.

HasLocalEdits()

Determines if any of the tables in the ServiceGeodatabase have unapplied edits.

LoadAsync()

Asynchronously initiates loading of this ServiceGeodatabase.

QuerySharedTemplatesAsync(SharedTemplateQueryParameters?, CancellationToken)

Queries the database for shared templates.

RetryLoadAsync()

Asynchronously retries loading of this ServiceGeodatabase.

SwitchVersionAsync(string)

Asynchronously switches all connected feature tables to the new version.

SwitchVersionAsync(string, CancellationToken)

Asynchronously switches all connected feature tables to the new version.

UndoLocalEditsAsync()

Undos all of the local edits in all the tables.

Events

Name Description
LoadStatusChanged

Occurs when the ServiceGeodatabase LoadStatus is changed.

Loaded

Occurs when the ServiceGeodatabase is loaded.

Applies to

TargetVersions
.NET Standard 2.0100.9 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.9 - 200.8
Xamarin.Android100.9 - 100.15
Xamarin.iOS100.9 - 100.15
UWP100.9 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.