Exemple #1
0
 public static async Task <int> SaveCustomerSchedule(T_Customer_Schedule model)
 {
     using (T_Customer_Schedule_Entities dao = new T_Customer_Schedule_Entities())
     {
         return(await dao.Save(model));
     }
 }
Exemple #2
0
        public async Task <int> Remove(long Id)
        {
            using (db = new KBLDataContext())
            {
                var entity = from c in db.CustomerSchedule
                             where c.Id == Id
                             select c;
                T_Customer_Schedule _model = await entity.FirstOrDefaultAsync();

                if (_model != null)
                {
                    db.CustomerSchedule.Remove(_model);
                }
                return(await db.SaveChangesAsync());
            }
        }