예제 #1
0
        //get user by ID

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

            return(variation);
        }
예제 #2
0
 //Update
 public string Update(Variation objVariation)
 {
     _db.Variations.Update(objVariation);
     _db.SaveChanges();
     return("Update successfully");
 }
예제 #3
0
        //Insert

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