public int RemovePicture(Pictures picture) { if (picture != null) { _picturesRepository.Delete(picture.ID); _picturesRepository.Save(); var smallKittenPath = _picturesLinksConstructor.GetSmallKittenImageFileName(picture.Image); RemoveFile(Server.MapPath(picture.Image)); RemoveFile(Server.MapPath(smallKittenPath)); } return(picture.ID); }