Esempio n. 1
0
        internal void Create(EMap m)
        {
            // Name ve Root bilgileri Before üzerinden yükleniyor.
            // Güncelleme bu bilgiler Instruction kısmı için düzenleniyor.
            // Kullandığımız entity'in Name ve Root bilgileri alınmalı.

            DEntity d = new DEntity();
            Envoy   e = new Envoy();

            d.TargetLocation = m.ExternalLocation;

            d = e.Before(new EMap(), d);
            e.CreateIfNotThere(d);
            UpdateList(d.TargetLocation);

            if (!IsThereAny(m.Entity))
            {
                if (l.Count > 0)
                {
                    m.Id = l[l.Count - 1].Id + 1;
                }
                else
                {
                    m.Id = 1;
                }

                DataAccess.Insert insert = new DataAccess.Insert
                                               (m, d);
            }
        }
Esempio n. 2
0
        internal EMap Get(string externalLocation, string entityName)
        {
            UpdateList(externalLocation);

            EMap map = new EMap();

            map = null;

            foreach (var item in l)
            {
                if (item.Entity == entityName)
                {
                    map = item;
                    break;
                }
            }

            return(map);
        }
Esempio n. 3
0
        internal void Delete(EMap map)
        {
            // Name ve Root bilgileri Before üzerinden yükleniyor.
            // Güncelleme bu bilgiler Instruction kısmı için düzenleniyor.
            // Kullandığımız entity'in Name ve Root bilgileri alınmalı.

            DEntity d = new DEntity();
            Envoy   e = new Envoy();

            d.TargetLocation = map.ExternalLocation;

            d = e.Before(new EMap(), d);
            UpdateList(d.TargetLocation);

            EMap m = new EMap();

            if (IsThereAny(map.Entity))
            {
                m = l.FirstOrDefault(x => x.Entity == map.Entity);
            }

            DataAccess.Reduce delete = new DataAccess.Reduce(m, d);
        }