public override PetProfileDTO SavePetDetSignUp(PetProfileDTO dto) { using (var context = new PHCEntities()) { try { PetProfileDTO pdto = new PetProfileDTO(); PetProfile pp = new PetProfile(); pp.UID = dto.UID; pp.PetName = dto.PetName; pp.PetBreed = dto.PetBreed; pp.PetCategory = dto.pcid.ToString(); context.AddToPetProfiles(pp); context.SaveChanges(); pdto.PID = pp.PID; return(pdto); } catch (Exception ex) { throw ex; } } }