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); }
private Picture AddTagToPicture(string tag, Picture picture) { var chosenTag = FindTag(tag).FirstOrDefault(t => t.TagName == tag); picture.Tags.Add(chosenTag); return picture; }