예제 #1
0
 public bool CreateAlbum(int userId, string albumName, out int id, out string errorString)
 {
     try
     {
     #warning should prevent duplicate albums with the same name
         Album album = new Album() { UserId = userId, Name = albumName };
         context.Albums.Add(album);
         context.SaveChanges();
         id = album.AlbumId;
         errorString = "";
         return true;
     }
     catch (Exception e)
     {
         errorString = "Error while trying to create album ," + e.Message;
         id = NullAlbumId;
         return false;
     }
 }
예제 #2
0
 public bool AddUserAlbum(int userID, Album album, out string errorString)
 {
     throw new NotImplementedException();
 }