public void SavePhoto(PhotoLink fileInfo, byte[] fileData) { using (TransactionScope scope = new TransactionScope()) { FileUploadUtil uploadUtil = new FileUploadUtil(); uploadUtil.SaveFile(fileInfo.Url, fileData); LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess(); dalc.InsertLinkItem(fileInfo.Title, fileInfo.Description, fileInfo.Url, LinkItemTypes.Image, DateTime.Now, null, fileInfo.Category); scope.Complete(); } }
public PhotoLink GetPhoto(int id) { LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess(); return(dalc.GetLinkItem <PhotoLink>(id)); }
public List <string> GetCategories() { LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess(); return(dalc.GetCategories()); }
public List <PhotoLink> GetPhotos() { LinkItems.Dalc.LinkItemsDataAccess dalc = new LinkItemsDataAccess(); return(dalc.GetLinkItems <PhotoLink>()); }