예제 #1
0
        public int DeleteSeller(SellerDeleteServiceInputModel data)
        {
            using (var con = new SqlConnection(configuration.GetValue <string>("ConnectionString:SQLConnection")))
            {
                try
                {
                    var dbParams = new DynamicParameters();
                    con.Open();
                    dbParams.Add("@Id", data.Id);
                    var reader = con.ExecuteReader(
                        sql: "[dbo].[SellerDeleteProcedure]",
                        param: dbParams,
                        commandType: CommandType.StoredProcedure);

                    return(1);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    con.Close();
                }
            }
        }
예제 #2
0
        public dynamic test(SellerDeleteServiceInputModel data)
        {
            using (var con = new SqlConnection(configuration.GetValue <string>("ConnectionString:SQLConnection")))
            {
                try
                {
                    var dbParams = new DynamicParameters();
                    con.Open();
                    dbParams.Add("@Id", data.Id);
                    var reader = con.Query <dynamic>(
                        sql: "[dbo].[GetProductTypeFieldsById]",
                        param: dbParams,
                        commandType: CommandType.StoredProcedure);

                    return(reader);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    con.Close();
                }
            }
        }
예제 #3
0
 public dynamic test(SellerDeleteServiceInputModel data)
 {
     return(_sellerRepository.test(data));
 }
예제 #4
0
 public IActionResult test(SellerDeleteServiceInputModel data)
 {
     return(Ok(_sellerService.test(data)));
 }
예제 #5
0
 public int DeleteSellerService(SellerDeleteServiceInputModel data)
 {
     return(_sellerRepository.DeleteSeller(data));
 }