public int CreateEventAttendance(int eventId, int memberId, int logBy) { using (var scope = new TransactionScope()) { var dbEventAttendance = new DataModel.Generated.EventAttendance() { MemberId = memberId, LogBy = logBy, EventId = eventId }; _unitOfWork.EventAttendanceRepository.Insert(dbEventAttendance); _unitOfWork.Save(); scope.Complete(); return dbEventAttendance.EventId; } }
public int CreateEventAttendance(int eventId, int memberId, int logBy) { using (var scope = new TransactionScope()) { var dbEventAttendance = new DataModel.Generated.EventAttendance() { MemberId = memberId, LogBy = logBy, EventId = eventId }; _unitOfWork.EventAttendanceRepository.Insert(dbEventAttendance); _unitOfWork.Save(); scope.Complete(); return(dbEventAttendance.EventId); } }