//DownloadList public FunctionCallStatus AddDownloadLinks(string categoryName, string categoryURL) { using (SantaBantaDataContext santaBantaDataContext = new SantaBantaDataContext()) { List<SantaBantaEntity.DownloadList> categorieses = new List<SantaBantaEntity.DownloadList>(); categorieses = WebSite.GetAllDownloadLinks(); int categoriesExistanceCheck = categorieses.Where(i => i.DownloadImageURL == categoryURL).ToList().Count; if (categoriesExistanceCheck == 0) { DownloadInformation category = new DownloadInformation(); category.ImageName = categoryName; category.ImageURL = categoryURL; santaBantaDataContext.DownloadInformations.InsertOnSubmit(category); santaBantaDataContext.SubmitChanges(); if (category.Id > 0) { return FunctionCallStatus.Success; } else { return FunctionCallStatus.Error; } } else { return FunctionCallStatus.DataAlreadyExists; } } }
private void detach_DownloadInformations(DownloadInformation entity) { this.SendPropertyChanging(); entity.Subcategory = null; }
partial void DeleteDownloadInformation(DownloadInformation instance);
partial void UpdateDownloadInformation(DownloadInformation instance);
partial void InsertDownloadInformation(DownloadInformation instance);
private void attach_DownloadInformations(DownloadInformation entity) { this.SendPropertyChanging(); entity.Category = this; }