示例#1
0
        public ITeamUser GetTeamUser(Guid teamId, Guid userId)
        {
            ITeamUser teamUser = null;

            using (var context = new Data.ScheduleContext())
            {
                var item = context.TeamUsers.FirstOrDefault(x => x.TeamId == teamId.ToString() && x.UserId == userId.ToString());
                if (item != null)
                {
                    teamUser = Mapper.Map <TeamUserDto>(item);
                }
            }
            return(teamUser);
        }
示例#2
0
 public ChangeResult UpdateTeamUser(ITeamUser teamUser)
 {
     return(UpdateTeamUser(new List <ITeamUser> {
         teamUser
     }));
 }
示例#3
0
 public ChangeResult AddTeamUser(ITeamUser teamUser)
 {
     return(AddTeamUser(new List <ITeamUser> {
         teamUser
     }));
 }