예제 #1
0
        protected static Guid GetGuid <T>(SqlBase source_con, object id)
        {
            Guid   result = Guid.NewGuid();
            var    map    = source_con.GetMapping <T>();
            string text   = source_con.Single <string>($"SELECT SyncGuid FROM {map.TableName} where {map.PK.Name}='{id}'");

            if (!string.IsNullOrEmpty(text))
            {
                Guid.TryParse(text, out result);
            }
            return(result);
        }