Beispiel #1
0
 internal AppRequest
 (
     AppFactory factory,
     AppRequestRecord record
 )
 {
     this.factory = factory;
     this.record  = record ?? new AppRequestRecord();
     ID           = new EntityID(this.record.ID);
 }
        internal async Task <AppRequest> Add(AppSession session, string requestKey, Resource resource, Modifier modifier, string path, DateTimeOffset timeRequested)
        {
            var record = new AppRequestRecord
            {
                SessionID   = session.ID.Value,
                RequestKey  = requestKey,
                ResourceID  = resource.ID.Value,
                ModifierID  = modifier.ID.Value,
                Path        = path ?? "",
                TimeStarted = timeRequested
            };
            await factory.DB.Requests.Create(record);

            return(factory.Request(record));
        }
Beispiel #3
0
 internal AppRequest Request(AppRequestRecord record) =>
 new AppRequest(this, record);