public int Save(Posisi obj) { if (!NamaIsUnique(obj.nama)) { return(-1); } int result = 0; using (IDbContext context = new DbContext()) { _repository = new PosisiRepository(context); result = _repository.Save(obj); } return(result); }