示例#1
0
 public async Task CreateOrEdit(CreateOrEditTeamDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
示例#2
0
        protected virtual async Task Create(CreateOrEditTeamDto input)
        {
            var team = ObjectMapper.Map <Team>(input);


            if (AbpSession.TenantId != null)
            {
                team.TenantId = (int?)AbpSession.TenantId;
            }


            await _teamRepository.InsertAsync(team);
        }
示例#3
0
        protected virtual async Task Update(CreateOrEditTeamDto input)
        {
            var team = await _teamRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, team);
        }