Example #1
0
        public void Delete(TEntity entityToDelete)
        {
            var cmd = mapper.GetDeleteCommand(entityToDelete);

            conn.CreateCommand(cmd);
            conn.ExecuteNonQueryCommand();
        }
Example #2
0
        //public void Insert(Operator entity)
        //{
        //    throw new NotImplementedException();
        //}

        /// <summary>
        /// only updates document / firstname
        /// </summary>
        /// <param name="entityToUpdate"></param>
        public void Update(Operator entityToUpdate)
        {
            conn.CreateCommand($"update Operators set Document ='{entityToUpdate.Document}', FirstName = '{entityToUpdate.FirstName}' where id ={entityToUpdate.Id}");
            conn.ExecuteNonQueryCommand();
        }