/// <summary> /// Atribui os valores das chaves autoincremental /// </summary> protected void SetIdentityValue(long value) { var keyIdentiyField = KeyFields.SingleOrDefault(f => f.Identity); if (keyIdentiyField != null) { keyIdentiyField.Value = value; } }
private IDictionary <string, string> GetRecursiveChildMap(IDictionary <string, string> recursiveChildKeyMap) { return(recursiveChildKeyMap? .Select( kvp => new { Key = KeyFields.SingleOrDefault(x => x.Split('_')[1] == kvp.Key), DistinctChildKey = kvp.Key == kvp.Value ? null : DataFields.SingleOrDefault(x => x.EqualsIgnoreCase("H_" + kvp.Value)) }) .ToDictionary(x => x.Key, x => x.DistinctChildKey ?? x.Key, StringComparer.InvariantCultureIgnoreCase)); }