public Task <bool> Submit(ClothInfo clothInfo) { try { clothInfo.orderId = (int)_context.ClothInfo.CountDocuments(FilterDefinition <ClothInfo> .Empty) + 1; _context.ClothInfo.InsertOneAsync(clothInfo); return(Task.FromResult(true)); } catch (Exception ex) { throw ex; } }
public ActionResult <bool> Submit([FromBody] ClothInfo clothInfo) { var result = _laundryRepository.Submit(clothInfo); return(result.Result); }