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