Esempio n. 1
0
 public void OnSelectedEntityChanged()
 {
     SelectedForeignKey = null;
     ForeignKeys.Clear();
     if (SelectedEntity == null)
     {
         SelectedEntityCaption = "";
     }
     else
     {
         SelectedEntityCaption = SelectedEntity.CodeElementFullName;
     }
 }
Esempio n. 2
0
 public void DoAnalise()
 {
     if (ForeignKeys.Count > 0)
     {
         CheckIsReady();
         return;
     }
     if ((SelectedEntity == null) || (SelectedDbContext == null))
     {
         SelectedForeignKey = null;
         ForeignKeys.Clear();
         CheckIsReady();
         return;
     }
     DoAnaliseEx();
 }
Esempio n. 3
0
        public void DoAnaliseEx()
        {
            SelectedForeignKey = null;
            ForeignKeys.Clear();
            if ((SelectedEntity == null) || (SelectedDbContext == null))
            {
                CheckIsReady();
                return;
            }

            List <FluentAPIForeignKey> result =
                (SelectedEntity.CodeElementRef as CodeClass).CollectForeignKeys(SelectedDbContext.CodeElementRef as CodeClass);

            if (result != null)
            {
                foreach (FluentAPIForeignKey itm in result)
                {
                    ForeignKeys.Add(itm);
                }
            }
            CheckIsReady();
        }
Esempio n. 4
0
 public void OnSelectedDbContextChanged()
 {
     SelectedForeignKey = null;
     ForeignKeys.Clear();
 }