public void Insert(Core.Business.ExhibitionInstrument exhibitionInstrument) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@InstrumentID", SqlDbType.UniqueIdentifier, exhibitionInstrument.InstrumentID); sql.AddParameter("@ExhibitionDate", SqlDbType.DateTime, exhibitionInstrument.ExhibitionDate); sql.AddParameter("@SequenceNumber", SqlDbType.Int, exhibitionInstrument.SequenceNumber); sql.AddParameter("@IsShowinHomePage", SqlDbType.Int, exhibitionInstrument.IsShowinHomePage); sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier); SqlDataReader reader = sql.ExecuteSPReader("usp_InsertExhibitionInstrument"); if (reader != null && !reader.IsClosed && reader.Read()) { if (!reader.IsDBNull(0)) { exhibitionInstrument.Id = reader.GetGuid(0); } reader.Close(); } else { if (reader != null && !reader.IsClosed) { reader.Close(); } } }