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 }); }
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)); }