public void Create(Member member) { member.City = context.Cities.Find(member.City.Id); context.Members.Add(member); context.SaveChanges(); }
public void Add(TEntity entity) { //_context.Set<TEntity>().Add(entity); _context.Entry(entity).State = EntityState.Added; _context.SaveChanges(); }