public void UpdateCustomerEmotion(CustomerModel customer, CreateTransactionCommand command) { customer.LastestCustomerEmotion = command.CustomerEmotion; customer.EmotionProbability = command.CustomerEmotionProbability; context.Entry <CustomerModel>(customer).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); }