Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
        }