示例#1
0
        internal void Delete(Type dtoType, int id)
        {
            // при удалении на сервере удалить из внутреннего кеша
            Task <HttpStatusCode> t = _client.DeleteAsync(dtoType, id);

            t.ContinueWith(td =>
            {
                if (td.Result != HttpStatusCode.Accepted)
                {
                    return;
                }
                if (_dataSources.ContainsKey(dtoType))
                {
                    ICachedData items = _dataSources[dtoType];
                    items.Delete(id);
                }
            });
        }