Exemplo n.º 1
0
        public bool DeleteTeamMember(DataModelTeamMember teamMember)
        {
            var obj = Work.TeamMemberRepository.GetData(t => t.InviteeUserId == teamMember.InviteeUserId && t.TeamId == teamMember.TeamId).FirstOrDefault();

            if (obj != null)
            {
                return(DeleteTeamMember(obj.Id));
            }
            return(false);
        }
Exemplo n.º 2
0
        public DataModelTeamMember CreateInvite(DataModelTeamMember invit)
        {
            License.Core.Model.TeamMember userinvit = AutoMapper.Mapper.Map <DataModel.TeamMember, License.Core.Model.TeamMember>(invit);
            var obj = Work.TeamMemberRepository.GetData(f => f.TeamId == invit.TeamId && f.InviteeEmail == invit.InviteeEmail).FirstOrDefault();

            if (obj == null)
            {
                obj = Work.TeamMemberRepository.Create(userinvit);
                Work.TeamMemberRepository.Save();
            }
            return(AutoMapper.Mapper.Map <License.Core.Model.TeamMember, DataModelTeamMember>(obj));
        }