The Page class has a User property that represents the user associated with the current request. This user, in turn, has an Identity property that contains the user’s Name. The Name is then assigned to the UserName property of the PhotoAlbum instance, which is retrieved from e.Entity.
At this stage, the name is successfully stored in the database, together with the rest of the photo album. What’s left is doing something useful with this name. The fi rst place where you use this name is in the default page of the PhotoAlbums folder. There, you used the following LINQ to Entities query to retrieve the UserName for a photo album: