Ejemplo n.º 1
0
        protected static Guid?GetLocalId <T> (IDataStoreContext ctx, long?remoteId)
            where T : CommonData, new()
        {
            if (remoteId == null)
            {
                return(null);
            }
            var id = ctx.GetLocalId <T> (remoteId.Value);

            if (id == Guid.Empty)
            {
                id = CreatePlaceholder <T> (ctx, remoteId.Value);
            }
            return(id);
        }
Ejemplo n.º 2
0
        protected static Guid GetLocalId <T> (IDataStoreContext ctx, long remoteId)
            where T : CommonData, new()
        {
            if (remoteId == 0)
            {
                throw new ArgumentException("Remote Id cannot be zero.", "remoteId");
            }
            var id = ctx.GetLocalId <T> (remoteId);

            if (id == Guid.Empty)
            {
                id = CreatePlaceholder <T> (ctx, remoteId);
            }
            return(id);
        }