コード例 #1
0
 public void Remove(Reportfield item)
 {
     if (item != null)
     {
         control.Remove(item);
         control.SaveChanges();
     }
     else
     {
         throw new Exception("This item not found in DataBase");
     }
 }
コード例 #2
0
        public Reportfield Get(int id)
        {
            Reportfield temp = control.GetAll().FirstOrDefault(x => x.Id == id);

            if (temp != null)
            {
                return(temp);
            }
            else
            {
                throw new Exception("Not Found Gender in DataBase");
            }
        }
コード例 #3
0
        public Reportfield Add(Reportfield item)
        {
            Reportfield temp = null;

            if (item != null)
            {
                temp = control.Add(item);
                control.SaveChanges();
                return(temp);
            }
            else
            {
                throw new Exception("This Gender alredy in base");
            }
        }
コード例 #4
0
 public void Remove(Reportfield item)
 {
     context.ReportFields.Remove(item);
 }
コード例 #5
0
 public Reportfield Add(Reportfield item)
 {
     return(context.ReportFields.Add(item));
 }