public void Delete(DalRole entity) { context.Set<Role>().Remove(entity.ToRole()); }
public void Update(DalRole entity) { Role ormRole = entity.ToRole(); context.Entry(ormRole).State = EntityState.Modified; }
public int Add(DalRole entity) { var ormRole = entity.ToRole(); context.Set<Role>().Add(ormRole); return ormRole.Id; }