public void Update(ProfileDTO profile)
 {
     Mapper.CreateMap<ProfileDTO, DAL.Entities.Profile>();
     //var updateProfile = Mapper.Map<ProfileDTO, DAL.Entities.Profile>(profile);
     Database.Profiles.Update(Mapper.Map<ProfileDTO, DAL.Entities.Profile>(profile));
     Database.Save();
 }
 public void Create(ProfileDTO profile)
 {
     DAL.Entities.Profile newProfile = new DAL.Entities.Profile
     {
         FirstName = profile.FirstName,
         LastName = profile.LastName,
         Age = profile.Age,
         CreationDate = DateTime.Now,
         UserId = profile.UserId
     };
     Database.Profiles.Create(newProfile);
     Database.Save();
 }