Exemplo n.º 1
0
 public Task <Contact> UpdateAsync(Contact value) => _ef.EventOutboxInvoker.InvokeAsync(this, async() =>
 {
     var __dataArgs = EfDbArgs.Create(_mapper);
     var __result   = await _ef.UpdateAsync <Contact, EfModel.Contact>(__dataArgs, Check.NotNull(value, nameof(value))).ConfigureAwait(false);
     _evtPub.PublishValue(__result, new Uri($"/contact/{_evtPub.FormatKey(__result)}", UriKind.Relative), $"Demo.Contact.{_evtPub.FormatKey(__result)}", "Update");
     return(__result);
 });
Exemplo n.º 2
0
 public Task <ContactCollectionResult> GetAllAsync() => DataInvoker.Current.InvokeAsync(this, async() =>
 {
     ContactCollectionResult __result = new ContactCollectionResult();
     var __dataArgs  = EfDbArgs.Create(_mapper);
     __result.Result = _ef.Query <Contact, EfModel.Contact>(__dataArgs, q => _getAllOnQuery?.Invoke(q, __dataArgs) ?? q).SelectQuery <ContactCollection>();
     return(await Task.FromResult(__result).ConfigureAwait(false));
 });
Exemplo n.º 3
0
 public Task DeleteAsync(Guid id) => _ef.EventOutboxInvoker.InvokeAsync(this, async() =>
 {
     var __dataArgs = EfDbArgs.Create(_mapper);
     await _ef.DeleteAsync <Contact, EfModel.Contact>(__dataArgs, id).ConfigureAwait(false);
     _evtPub.PublishValue(new Contact {
         Id = id
     }, new Uri($"/contact/{_evtPub.FormatKey(id)}", UriKind.Relative), $"Demo.Contact.{_evtPub.FormatKey(id)}", "Delete", id);
 });
Exemplo n.º 4
0
        public async Task <RefDataNamespace.StatusCollection> StatusGetAllAsync()
        {
            var __coll = new RefDataNamespace.StatusCollection();
            await DataInvoker.Current.InvokeAsync(this, async() => { _ef.Query <RefDataNamespace.Status, EfModel.Status>(EfDbArgs.Create(_mapper)).SelectQuery(__coll); await Task.CompletedTask.ConfigureAwait(false); }, BusinessInvokerArgs.TransactionSuppress).ConfigureAwait(false);

            return(__coll);
        }
Exemplo n.º 5
0
 public Task <PerformanceReview?> GetAsync(Guid id) => DataInvoker.Current.InvokeAsync(this, async() =>
 {
     var __dataArgs = EfDbArgs.Create(_mapper);
     return(await _ef.GetAsync <PerformanceReview, EfModel.PerformanceReview>(__dataArgs, id).ConfigureAwait(false));
 });
Exemplo n.º 6
0
 public Task <Contact?> GetAsync(Guid id) => DataInvoker.Current.InvokeAsync(this, async() =>
 {
     var __dataArgs = EfDbArgs.Create(_mapper);
     return(await _ef.GetAsync <Contact, EfModel.Contact>(__dataArgs, id).ConfigureAwait(false));
 });