public ProjectEntity ConvertToEntity(ProjektModel entity) { if (entity == null) return null; var model = new ProjectEntity(entity.Id); model.Description = entity.Description; model.Name = entity.Name; return model; }
public async Task<ProjektModel> ConvertToModel(ProjectEntity entity) { if (entity == null) return null; var model = new ProjektModel(entity.Id); model.Description = entity.Description; model.Name = entity.Name; model.Passwords = await PasswordRepository.Instance.GetPasswordsByProjektId(entity.Id); model.Milstones = await MilestoneRepository.Instance.GetMilestonesByProjektId(entity.Id); return model; }