I do have the code for it, it's a legacy project but I can change it (if I'm
feeling gutsy :-) )
Here's an example, its simple ADO.NET:
public static Meeting GetMeeting(int meetingID)
{
Meeting meetingToReturn = null;
using (SqlConnection conn =
DatabaseConnection.JobProcessConnection())
{
string query = "SELECT * " +
" FROM Actions_Meetings " +
" WHERE MeetingID = @id";
SqlCommand comm = new SqlCommand(query, conn);
comm.Parameters.AddWithValue("id", meetingID);
conn.Open();
IList<Meeting> meetings = ReadMeetings(comm);
if (meetings.Count > 0)
meetingToReturn = meetings[0];
}
return meetingToReturn;
}
I believe the connection is closed automatically when it is disposed.
Can you forsee any issues that may crop up with me calling Flush before
calling this external DLL, then continuing my nhibernate changes after
calling it?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/rFGCpPjkw-EJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.