Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }