private static void Watch_Inserted(SmsOutbox entity) { PrintEnity("Inserted", entity); /*send sms*/ _db.Sms.Attach(entity); entity.SentDateTimeUtc = DateTime.UtcNow; _db.Entry(entity).State = EntityState.Modified; _db.SaveChanges(); PrintEnity("Sms Process", entity); }
private static void Watch_Deleted(SmsOutbox entity) { PrintEnity("Deleted", entity); }
private static void Watch_Updated(SmsOutbox entity) { PrintEnity("Updated", entity); }
private static void PrintEnity(string title, SmsOutbox entity) { Console.WriteLine(title + " \t: " + JsonConvert.SerializeObject(entity)); }