Ejemplo n.º 1
0
        public T GetOriginal <T>(T newEntity) where T : SystemEntity
        {
            SiteCloneContextEntry entry = Entries.FirstOrDefault(x => x.NewEntity == newEntity);

            if (entry != null)
            {
                return(entry.Original as T);
            }
            return(null);
        }
Ejemplo n.º 2
0
        public T FindNew <T>(int id) where T : SystemEntity
        {
            SiteCloneContextEntry entry = Entries.FirstOrDefault(x => typeof(T).IsAssignableFrom(x.Type) && x.Id == id);

            if (entry != null)
            {
                return(entry.NewEntity as T);
            }
            return(null);
        }