public Models.Content GetContentForEdit(Guid contentId) { Models.Content content = repository.AsQueryable <Models.Content>() .Where(p => p.Id == contentId && !p.IsDeleted) .FetchMany(p => p.History) .ToList() .FirstOrDefault(); if (content != null) { return(content.FindEditableContentVersion()); } return(null); }