public virtual void Add(TEntity entity)
        {
            Console.WriteLine(context.Entry(entity).State);

            entities.Add(entity);

            var entries = context.ChangeTracker.Entries();

            foreach (DbEntityEntry entry in entries)
            {
            }

            Console.WriteLine(context.Entry(entity).State);

            context.SaveChanges();

            Console.WriteLine(context.Entry(entity).State);
        }
Example #2
0
 public async Task UpdateAsync(Service entity)
 {
     context.Entry(entity).State = EntityState.Modified;
     await context.SaveChangesAsync();
 }