예제 #1
0
 public async Task CreateAsync([FromBody] Producer producers)
 {
     if (ModelState.IsValid)
     {
         await _iProducer.Add(producers);
     }
 }
예제 #2
0
 public Task Add(T obj, CancellationToken cancellation = new CancellationToken())
 {
     if (!_predicate(obj))
     {
         return(cancellation.IsCancellationRequested ? TaskEx.Cancelled : TaskEx.Completed);
     }
     return(_producer.Add(obj, cancellation));
 }
예제 #3
0
 public Task Add(TR obj, CancellationToken cancellation = new CancellationToken())
 {
     return(_producer.Add(_convert(obj), cancellation));
 }
예제 #4
0
 public static bool Add(ProducerInfo producerInfo)
 {
     return(dal.Add(producerInfo));
 }