Exemplo n.º 1
0
 public void Remove(FieldVariants item)
 {
     if (item != null)
     {
         control.Remove(item);
         control.SaveChanges();
     }
     else
     {
         throw new Exception("This item not found in DataBase");
     }
 }
Exemplo n.º 2
0
        public FieldVariants Get(int id)
        {
            FieldVariants temp = control.GetAll().FirstOrDefault(x => x.Id == id);

            if (temp != null)
            {
                return(temp);
            }
            else
            {
                throw new Exception("Not Found Gender in DataBase");
            }
        }
Exemplo n.º 3
0
        public FieldVariants Add(FieldVariants item)
        {
            FieldVariants temp = null;

            if (item != null)
            {
                temp = control.Add(item);
                control.SaveChanges();
                return(temp);
            }
            else
            {
                throw new Exception("This Gender alredy in base");
            }
        }
Exemplo n.º 4
0
 public void Remove(FieldVariants item)
 {
     context.FieldVariant.Remove(item);
 }
Exemplo n.º 5
0
 public FieldVariants Add(FieldVariants item)
 {
     return(context.FieldVariant.Add(item));
 }