public List<HeartedSongVM> Get(string q, string s)
        {
            SongManager sm = new SongManager(_db);
            string userId = Microsoft.AspNet.Identity.IdentityExtensions.GetUserId(RequestContext.Principal.Identity);

            //"SELECT * FROM[aspnet - MusicPortal].[dbo].[Songs] ORDER BY[aspnet - MusicPortal].[dbo].[Levenshtein]([Name],  @q, 30) / CAST(LEN([Name]) AS decimal)"
            //SELECT * FROM [dbo].[Songs] ORDER BY [dbo].[Levenshtein]([Name],  @q, 30) / CAST(LEN([Name]) AS decimal)
            var query = "SELECT[Id] FROM[dbo].[Songs] ORDER BY[dbo].[Levenshtein]([Name],  @q, 30) / CAST(LEN([Name]) AS decimal) OFFSET 0 ROWS FETCH NEXT 50 ROWS ONLY";
            var b = _db.Database.SqlQuery<long>(s, new SqlParameter("@q", q)).ToList();
            var c = _db.Songs.Where(so => b.Contains(so.Id));
            return  sm.MakeHeartedSong(c, userId).ToList().OrderBy(so => b.FindIndex(bo => bo == so.SongId)).ToList();
        }
        public PlaylistVM GetPlaylistById(long playlistId, string user_id, bool check_if_owner = false)
        {
            var playlist = _db.Playlists.Where(pl => pl.Id == playlistId).FirstOrDefault();
            if (playlist == null)
                throw new Exception("Playlist with this ID doesn't exist");

            if (user_id != null && check_if_owner && !playlist.OwnerId.Equals(user_id))
                throw new Exception("This user isn't owner of this playlist");

            SongManager sm = new SongManager(_db);

            var songs_query = _db.PlaylistSongs.Where(pls => pls.PlaylistId == playlistId).Join(_db.Songs, p => p.SongId, s => s.Id, (p, s) => s);
            var songs = sm.MakeHeartedSong(songs_query, user_id);

            return new PlaylistVM
            {
                Id = playlist.Id,
                Title = playlist.Title,
                Songs = songs.ToList()
            };
        }