Exemplo n.º 1
0
        public EntityState Create(object proxy)
        {
            var item  = ProxyUtils.GetTargetEntity(proxy);
            var state = new EntityState(ProxyUtils.GetEntityId(proxy));

            _state.Add(item, state);
            return(state);
        }
Exemplo n.º 2
0
        public bool Contains(object proxy)
        {
            var item = ProxyUtils.GetTargetEntity(proxy);

            if (item == null)
            {
                return(false);
            }
            return(_state.ContainsKey(item));
        }
Exemplo n.º 3
0
        public void Remove(object proxy)
        {
            var item = ProxyUtils.GetTargetEntity(proxy);

            _state.Remove(item);
        }
Exemplo n.º 4
0
        public EntityState Get(object proxy)
        {
            var item = ProxyUtils.GetTargetEntity(proxy);

            return(_state[item]);
        }