using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using BLL;
using Model;
using Helper;
using System.Data;
namespace WEBAPI
{
    public partial class research : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Music m = new Music();
            try
            {
                m.Artist = Request["artist"];
                m.Name = Request["name"];
                double similar = Convert.ToDouble(Request["similar"]);
                MusicBLL bll = new MusicBLL();
               m= bll.ReSearch(m, similar);
            }
            catch (Exception ex)
            {
                m.Name = ex.Message;
                m.Artist = ex.GetType().ToString();
                m.Album = ex.TargetSite.ToString();
            }
            Response.Write(Music.ListToJson(new List<Music> { m }));
        }
    }
}