Example #1
0
        //public void Delete(Operator entityToDelete)
        //{
        //    throw new NotImplementedException();
        //}

        //public void DeleteById(object id)
        //{
        //    throw new NotImplementedException();
        //}

        public Operator GetById(object id)
        {
            conn.CreateCommand($"select * from Operators  where id ={id}");
            var data = conn.ExecuteReaderCommand();
            var op   = data.MapEntity <Operator>();

            return(op);
        }
Example #2
0
        public void Delete(TEntity entityToDelete)
        {
            var cmd = mapper.GetDeleteCommand(entityToDelete);

            conn.CreateCommand(cmd);
            conn.ExecuteNonQueryCommand();
        }