private void UpdateMember(MemberDetail memberDetail)
        {
            var member = _memberRepository.Get(memberDetail.Id);
            var defaultInstrument = _instrumentRepository.Get(memberDetail.DefaultInstrumentId);

            if (member != null)
            {
                member.FirstName = memberDetail.FirstName;
                member.LastName = memberDetail.LastName;
                member.Alias = memberDetail.Alias;
                member.DefaultInstrument = defaultInstrument;
            };

            _memberRepository.Update(member);
        }
        private int AddMember(MemberDetail memberDetail)
        {
            var band = _bandRepository.Get(memberDetail.BandId);
            var defaultInstrument = _instrumentRepository.Get(memberDetail.DefaultInstrumentId);

            var m = new Member
            {
                Band = band,
                FirstName = memberDetail.FirstName,
                LastName = memberDetail.LastName,
                Alias = memberDetail.Alias,
                DefaultInstrument = defaultInstrument
            };

            if (defaultInstrument != null)
            {
                m.MemberInstruments = new Collection<MemberInstrument>
                {
                    new MemberInstrument
                    {
                        Member = m,
                        Instrument = defaultInstrument
                    }
                };
            }

            var id = _memberRepository.Add(m);

            _userRepository.AddAllUserPreferenceTableMember(memberDetail.BandId, id);

            return id;
        }