private static void AddDependancy(MemberDeclaration declare) { var HasForeinkeyWithDeclaration = declare.IsForignKey && MemberDeclarationList.ContainsKey(declare.foreignKeyEntity); if (HasForeinkeyWithDeclaration) { var dep = MemberDeclarationList[declare.foreignKeyEntity].First(x => x.IsPrimaryKey == true); dep.Dependancies.Add(declare.EnityType, declare.MemberInfo); } }
private static void AddDecaration(Type item) { var members = item.GetProperties(); var memberDesclations = new List <MemberDeclaration>(); foreach (var member in members) { var memberDeclaration = new MemberDeclaration(); memberDeclaration.EnityType = item; memberDeclaration.MemberInfo = member; memberDeclaration.MemberName = member.Name; HandleFieldLevelAttributes(member, memberDeclaration); memberDesclations.Add(memberDeclaration); } MemberDeclarationList.Add(item, memberDesclations); }