Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
        public ActionResult <bool> Submit([FromBody] ClothInfo clothInfo)
        {
            var result = _laundryRepository.Submit(clothInfo);

            return(result.Result);
        }