Exemple #1
0
        public DbRatingType Update(DbRatingType item)
        {
            Command cmd = new Command("UPDATE RatingType SET Name = @name, Definition = @definition OUTPUT inserted.* ");

            cmd.SetParameters(item);
            return(_connection.ExecuteReader(cmd, UniversalDbToEntityMapper.Mapper <DbRatingType>).FirstOrDefault());
        }
Exemple #2
0
        public DbRatingType Insert(DbRatingType item)
        {
            Command cmd = new Command("INSERT INTO RatingType(Name, Definition) OUTPUT inserted.* VALUES (@name, @definition)");

            cmd.SetParameters(item);
            return(_connection.ExecuteReader(cmd, UniversalDbToEntityMapper.Mapper <DbRatingType>).FirstOrDefault());
        }