Posted on: 12/17/2014 10:04:56 PM | Views : 613

I have a method that execute Store proc and retun a record that I need to access to its value in my C# code. I am using  microsoft Enterprise Library fr accessing to database. This is my Method:
 
public Model.Customer GetCustomerInfo(string UserName, string Password) { Model.Customer model = null; string myConnection = System.Configuration.ConfigurationManager.ConnectionStrings[connectionName].ToString(); SqlDatabase db = new SqlDatabase(myConnection); using (DbCommand command = db.GetStoredProcCommand("get_Customer")) { db.AddInParameter(command, "UserName", DbType.String, UserName); db.AddInParameter(command, "Password", DbType.String, Password); var result = db.ExecuteReader(command); try { if (r ...

Go to the complete details ...