private static void CompleteBlobSetEvent(BlobSetEvent @event, RequestData request) { if (request != null) { @event.Url = request.Url; @event.UserAgent = request.UserAgent; @event.RemoteMachine = request.RemoteMachine; @event.SessionId = request.SessionId; } }
public void CreateEventUserViewBlobSet(User user, BlobSet set, RequestData request) { BlobSetEvent @event = new BlobSetEvent() { BlobSetEventId = Guid.NewGuid(), EventDateTime = DateTime.UtcNow, EventType = (int)EventType.View, User = user, BlobSet = set }; CompleteBlobSetEvent(@event, request); this.context.BlobSetEvents.AddObject(@event); this.context.SaveChanges(); }