Files
using.cash/Logic/Support/TemporaryIdentity.cs
T
2014-10-08 23:53:12 +02:00

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;
}
}
}
}