HBS.Data.Concrete.AdminRepository.GetModule C# (CSharp) Method

GetModule() public method

public GetModule ( int moduleId ) : Module
moduleId int
return HBS.Entities.Module
        public Module GetModule(int moduleId)
        {
            var moduel = new Module();
            using (var conn = new SqlConnection(PrescienceRxConnectionString))
            {
                conn.Open();
                using (var cmd = new SqlCommand(GetModuleSp, conn))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add("@ModuleId", System.Data.SqlDbType.Int);
                    cmd.Parameters["@ModuleId"].Value = moduleId;
                    using (var myReader = cmd.ExecuteReader())
                    {
                        try
                        {
                            while (myReader.Read())
                            {
                                moduel = new Module(myReader);
                            }
                        }
                        catch (Exception ex)
                        {
                            // TODO Logg Error here
                        }
                    }
                }
            }
            return moduel;
        }