public async Task <ProfileCardDto> UpdateProfileCardAdditional(string username, long id, ProfileCardAdditionalDto dto) { var item = await profileCardManager.FindInclude(id); var item2 = Mapper.Map(dto, item); item = await profileCardManager.UpdateType(item2); var ditem = await deviceManager.FindInclude(dto.DeviceId ?? 0); if (ditem != null) { ditem.ProfileCardEntity_Id = item.Id; await deviceManager.UpdateType(ditem); } return(Mapper.Map <ProfileCardDto>(item)); }
public async Task <DeviceDto> GetDevice(long id) { var result = await deviceManager.FindInclude(id); return(Mapper.Map <DeviceDto>(result)); }