Exemplo n.º 1
0
        internal IEnumerable <ModelAttribute> CheckFKAutoIdentityErrors()
        {
            if (string.IsNullOrWhiteSpace(FKPropertyName))
            {
                return(new ModelAttribute[0]);
            }

            return(FKPropertyName.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                   .Select(name => Dependent.Attributes.FirstOrDefault(a => a.Name == name.Trim()))
                   .Where(a => a != null && a.IsIdentity && a.IdentityType == IdentityType.AutoGenerated)
                   .ToList());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the individual foreign key property names defined in the FKPropertyName property
 /// </summary>
 public string[] GetForeignKeyPropertyNames()
 {
     return(FKPropertyName?.Split(',').Select(n => n.Trim()).ToArray() ?? new string[0]);
 }