Did some preliminary streaming tests from an mobile app and the functionality works. it is a little rough but it can be smoothed out. Created manager classes to abstract functionality from the SongManager class. #7
This commit is contained in:
@@ -193,21 +193,17 @@ namespace Icarus.Models.Context
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("dddd");
|
||||
_logger.Info("Retrieving song from database");
|
||||
|
||||
using (var conn = GetConnection())
|
||||
{
|
||||
conn.Open();
|
||||
var query = "SELECT * FROM Song WHERE Id=@Id";
|
||||
Console.WriteLine("Transfer");
|
||||
|
||||
using (var cmd = new MySqlCommand(query, conn))
|
||||
{
|
||||
Console.WriteLine("Temperment");
|
||||
cmd.Parameters.AddWithValue("@Id", song.Id);
|
||||
|
||||
Console.WriteLine("Lost");
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
{
|
||||
song = ParseSingleData(reader);
|
||||
@@ -303,7 +299,6 @@ namespace Icarus.Models.Context
|
||||
{
|
||||
Song song = new Song();
|
||||
|
||||
Console.WriteLine("ddddddddddddd");
|
||||
while (reader.Read())
|
||||
{
|
||||
song.Id = Convert.ToInt32(reader["Id"]);
|
||||
@@ -321,8 +316,6 @@ namespace Icarus.Models.Context
|
||||
song.YearId = Convert.ToInt32(reader["YearId"].ToString());
|
||||
}
|
||||
|
||||
Console.WriteLine("Panic");
|
||||
|
||||
return song;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user