コード例 #1
0
 /// <summary>
 /// UpdateAmenities: It is used to Update Amenities
 /// </summary>
 public bool UpdateAmenities(CssAmenities model)
 {
     try
     {
         var result = _context.Amenities.Update(model);
         _context.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
コード例 #2
0
 /// <summary>
 /// AddAmenities: It is used to Add Amenities to Database
 /// </summary>
 public int AddAmenities(CssAmenities model)
 {
     try
     {
         var result = _context.Amenities.Add(model);
         _context.SaveChanges();
         return(result.Entity.Code);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }