Esempio n. 1
0
 private Dto.ProfileDto MapToDto(Domain.Profile profileDomain)
 {
     return(new Dto.ProfileDto()
     {
         Description = profileDomain.Description,
         Key = profileDomain.Key,
         Name = profileDomain.Name,
         Files = profileDomain.Files != null?fileService.MapToDto(profileDomain.Files) : null
     });
 }
Esempio n. 2
0
        public Dto.ProfileDto Add(string name, string description)
        {
            var profile = new Domain.Profile()
            {
                Name        = name,
                Key         = Guid.NewGuid(),
                Description = description,
            };

            var result = Repo.Add(profile);

            Repo.Complete();
            return(MapToDto(result));
        }