예제 #1
0
 private void ReplaceChangedByDefaultImageStorage(Picture picture)
 {
     var sourceFileName = Server.MapPath(String.Concat(picture.PictureDirectoryPath, picture.DefaultPictureFilename));
     var destinationFileName = Server.MapPath(String.Concat(picture.PictureDirectoryPath, picture.ChangedPictureFilename));
     System.IO.File.Copy(sourceFileName, destinationFileName, true);
 }
예제 #2
0
 private Picture AddTagToPicture(string tag, Picture picture)
 {
     var chosenTag = FindTag(tag).FirstOrDefault(t => t.TagName == tag);
     picture.Tags.Add(chosenTag);
     return picture;
 }