示例#1
0
        public void Create(Member member)
        {
            member.City = context.Cities.Find(member.City.Id);

            context.Members.Add(member);
            context.SaveChanges();
        }
示例#2
0
 public void Add(TEntity entity)
 {
     //_context.Set<TEntity>().Add(entity);
     _context.Entry(entity).State = EntityState.Added;
     _context.SaveChanges();
 }