Click or drag to resize

ImportSessionManagerCreate Method

Creates a new import session

Namespace:  Law.EdaIntegration.Import
Assembly:  Law.EdaIntegration (in Law.EdaIntegration.dll) Version: 7.2
Syntax
C#
public ImportSession Create(
	string sessionLabel = ""
)

Parameters

sessionLabel (Optional)
Type: SystemString
An optional value to use as the session label in place of the auto-generated value.

Return Value

Type: ImportSession
The newly generated ImportSession
Exceptions
ExceptionCondition
EdaApiExceptionthrown if the session label already exists
Examples
The following example demonstrates creating a new import session
C#
using Law.EdaIntegration;

class Sample
{
    public static void Main()
    {
        string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword";
        EdaIntegration edaIntegration = new EdaIntegration();
        edaIntegration.InitializeEnvironment(connectionString);

        Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1");

        ImportSession session = edaCase.Imports.ImportSessions.Create();
        Console.WriteLine("Id: {0},  Label: {1}", session.Id, session.Label);
    }
}
/*
This example produces the following results:

Id: 5,  Label: 2014-06-25-001
 */
See Also