コード例 #1
0
ファイル: KHRepository.cs プロジェクト: anhhieu1234/api
        public bool Create(KHModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_customer_create",
                                                                              "@customer_email", model.customer_email,
                                                                              "@customer_password", model.customer_password);
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
ファイル: KHController.cs プロジェクト: anhhieu1234/api
 public KHModel CreateItem([FromBody] KHModel model)
 {
     _customerBusiness.Create(model);
     return(model);
 }
コード例 #3
0
ファイル: KHBusiness.cs プロジェクト: anhhieu1234/api
 public bool Create(KHModel model)
 {
     return(_res.Create(model));
 }