public static MatchPhoto AddNew(string FileName, string Title, int MatchID, User Owner) { PhotoData data = new PhotoData(); data.UploadDate = DateTime.Now; data.AuthorID = Owner.ID; data.Title = Title; data.FileName = FileName; data.MatchID = MatchID; MatchPhoto photo = new MatchPhoto(data); data.ID = photo.Save(); return(photo); }
public MatchPhoto(int PhotoID) { MatchPhoto p = (from a in GetAll() where a.ID == PhotoID select a).FirstOrDefault(); _data = p._data; }