public string GetNetPrice(string country, string gender, bool age) { IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", true, true) .Build(); ConnectionString = config.GetSection("Dapper").GetSection("Conn").Value; dbservice = new DapperDbService(ConnectionString); string data = String.Empty; try { var res = dbservice.Get <string>(@" EXEC [dbo].[GetNetPrice] @Country,@Gender, @age ", new { Country = country, Gender = gender, Age = age } ); data = res; } catch (Exception ex) { } return(data); }
public string GetCoveragePlanID(string country) { IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", true, true) .Build(); ConnectionString = config.GetSection("Dapper").GetSection("Conn").Value; dbservice = new DapperDbService(ConnectionString); string data = String.Empty; try { var res = dbservice.Get <string>(@" EXEC [dbo].[GetCoveragePlanId] @Country ", new { Country = country } ); data = res; } catch (Exception ex) { } return(data); }