Ejemplo n.º 1
0
        public bool Delete(DbVisibilityLimit limit)
        {
            Command cmd = new Command("DELETE * FROM VisibilityLimit WHERE UploadId = @uploadid AND CountryId = @countryid");

            cmd.SetParameters(limit);
            return(_connection.ExecuteNonQuery(cmd) == 1);
        }
Ejemplo n.º 2
0
        public DbVisibilityLimit Create(DbVisibilityLimit limit)
        {
            Command cmd = new Command("INSERT INTO VisibilityLimit(UploadId, CountryId) OUTPUT inserted.* VALUES (@uploadid, @countryid)");

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