Exemplo n.º 1
0
        //get user by ID

        public Variation GetVariationById(int id)
        {
            Variation variation = _db.Variations.FirstOrDefault(s => s.VariationId == id);

            return(variation);
        }
Exemplo n.º 2
0
 //Update
 public string Update(Variation objVariation)
 {
     _db.Variations.Update(objVariation);
     _db.SaveChanges();
     return("Update successfully");
 }
Exemplo n.º 3
0
        //Insert

        public string Create(Variation objVariation)
        {
            _db.Variations.Add(objVariation);
            _db.SaveChanges();
            return("save successfully");
        }