public tblUser(string username, string emailaddress, string password) { UserName = username; EmailAddress = emailaddress; Password = password; RecordShackCMSEntities context = new RecordShackCMSEntities(); UserID = context.tblUsers.OrderByDescending(u => u.UserID).FirstOrDefault().UserID + 1; }
public tblRating(int recordid, string comment, int rating, string username) { RecordID = recordid; Comment = comment; Rating = rating; RecordShackCMSEntities context = new RecordShackCMSEntities(); RatingID = context.tblRatings.OrderByDescending(x => x.RatingID).FirstOrDefault().RatingID + 1; UserID = context.tblUsers.Where(u => u.UserName.ToLower() == username.ToLower()).Select(u => u.UserID).FirstOrDefault(); }
public tblArtist(string name, string bio, string imgsrc, string imgalt) { RecordShackCMSEntities context = new RecordShackCMSEntities(); ArtistName = name; ArtistBio = bio; ImageSrc = imgsrc; ImageAlt = imgalt; ArtistID = context.tblArtists.OrderByDescending(x => x.ArtistID).FirstOrDefault().ArtistID + 1; }
public tblGenre(string name, string bio, string imgsrc, string imgalt) { RecordShackCMSEntities context = new RecordShackCMSEntities(); GenreName = name; GenreBio = bio; ImageSrc = imgsrc; ImageAlt = imgalt; GenreID = context.tblGenres.OrderByDescending(x => x.GenreID).FirstOrDefault().GenreID + 1; }
public tblRecord(int artistid, int genreid, string name, string bio, DateTime releasedate, string imgsrc, string imgalt) { RecordShackCMSEntities context = new RecordShackCMSEntities(); ArtistID = artistid; GenreID = genreid; RecordName = name; RecordBio = bio; ReleaseDate = releasedate; ImageSrc = imgsrc; ImageAlt = imgalt; RecordID = context.tblRecords.OrderByDescending(x => x.RecordID).FirstOrDefault().RecordID + 1; }