public string GetAlbumRankingID()
        {
            AlbumRanking albumranking = new AlbumRanking();
            var          mylist       = this.ListAlbumRanking().ToList();

            if (mylist.Count == 0)
            {
                albumranking.AlbumRankingID = "0000000001";
            }
            else
            {
                string s = ((from a in mylist
                             select new { a.AlbumRankingID }).Last()).AlbumRankingID.ToString();
                int    lastint = Int32.Parse(s.Substring(0, 10)) + 1;
                string myid    = String.Format("{0:0000000000}", lastint);

                albumranking.AlbumRankingID = myid;
            }
            return(albumranking.AlbumRankingID);
        }
 public void Add(AlbumRanking albumranking)
 {
     db.AlbumRankings.InsertOnSubmit(albumranking);
 }
        public AlbumRanking SelectRankByCustomerID(Guid userid)
        {
            AlbumRanking albumranking = new AlbumRanking();

            return(db.AlbumRankings.First(s => s.UserID == userid));
        }