コード例 #1
0
 public virtual void Remove(File file)
 {
     try
     {
         db.Files.DeleteOnSubmit(file);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
コード例 #2
0
 public virtual void Create(File file)
 {
     try
     {
         this.db.Files.InsertOnSubmit(file);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
コード例 #3
0
 public virtual void Update(File file)
 {
     try
     {
         File FileOld = this.GetById(file.ID);
         FileOld = file;
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
コード例 #4
0
 partial void DeleteFile(File instance);
コード例 #5
0
 partial void UpdateFile(File instance);
コード例 #6
0
 partial void InsertFile(File instance);
コード例 #7
0
		private void detach_Files(File entity)
		{
			this.SendPropertyChanging();
			entity.Upload = null;
		}
コード例 #8
0
		private void attach_Files(File entity)
		{
			this.SendPropertyChanging();
			entity.Upload = this;
		}
コード例 #9
0
 public virtual int Delete(File file)
 {
     try
     {
         //File.IsDelete = true;
         db.SubmitChanges();
         return 0;
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }