Example #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();
                }
            }
        }
Example #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();
                }
            }
        }
Example #3
0
 public dynamic test(SellerDeleteServiceInputModel data)
 {
     return(_sellerRepository.test(data));
 }
 public IActionResult test(SellerDeleteServiceInputModel data)
 {
     return(Ok(_sellerService.test(data)));
 }
Example #5
0
 public int DeleteSellerService(SellerDeleteServiceInputModel data)
 {
     return(_sellerRepository.DeleteSeller(data));
 }