Exemple #1
0
        public async Task <Content> UpdateAsync(Content content)
        {
            string cacheKey = typeof(Content).ToString() + ".Single." + content.Id;

            _db.Update(content);
            await _db.SaveChangesAsync();

            _eventService.TriggerContentChanged(this);
            _cache.Add(cacheKey, content, TimeSpan.FromMinutes(60));
            return(content);
        }
Exemple #2
0
 public virtual async Task UpdateUserAsync(ApplicationUser user)
 {
     _db.Update(user);
     await _db.SaveChangesAsync();
 }