29 lines
677 B
C#
29 lines
677 B
C#
using Swarmops.Basic.Interfaces;
|
|
using Swarmops.Database;
|
|
|
|
namespace Swarmops.Logic.Support
|
|
{
|
|
public class TemporaryIdentity: IHasIdentity
|
|
{
|
|
public TemporaryIdentity (int temporaryId)
|
|
{
|
|
this.temporaryId = temporaryId;
|
|
}
|
|
|
|
static public TemporaryIdentity GetNew()
|
|
{
|
|
return new TemporaryIdentity (SwarmDb.GetDatabaseForWriting().GetTemporaryIdentity()); // This is actually an Insert, not a Select
|
|
}
|
|
|
|
private int temporaryId;
|
|
|
|
public int Identity
|
|
{
|
|
get
|
|
{
|
|
return temporaryId;
|
|
}
|
|
}
|
|
}
|
|
}
|