public Person CreatePerson(Person person) { _ctx.Persons.Attach(person).State = EntityState.Added; _ctx.SaveChanges(); return(person); }
public Event CreateEvent(Event ev) { _ctx.Events.Attach(ev).State = EntityState.Added; _ctx.SaveChanges(); return(ev); }
public Company CreateCompany(Company company) { _ctx.Companies.Attach(company).State = EntityState.Added; _ctx.SaveChanges(); return(company); }