public static EntityDTO ToDTO(Entity entity) { return(new EntityDTO() { Id = entity.EntityId, UserId = entity.UserId, IsApproved = entity.IsApproved, EntityName = entity.EntityName, EntityResponsableName = entity.EntityResponsableName, Email = entity.Email, EntityPhone = entity.EntityPhone, Password = entity.Password, EntityReferencePoint = entity.EntityReferencePoint, EntityAffinity = AffinityAdapter.ListToDTO(entity.EntityAffinity), EntityInitials = entity.EntityInitials, EntityCreationDate = entity.EntityCreationDate, EntitySocialNetwork = entity.EntitySocialNetwork, EntityWebSite = entity.EntityWebSite, EntityDescription = entity.EntityDescription, EntityAddress = new AddressDTO() { AddressId = entity.EntityAddress.AddressId, CEP = entity.EntityAddress.CEP, Avenue = entity.EntityAddress.Avenue, Number = entity.EntityAddress.Number, Neighborhood = entity.EntityAddress.Neighborhood, City = entity.EntityAddress.City, State = entity.EntityAddress.State } }); }
public static VoluntaryDTO ToDTO(Voluntary voluntary) { return(new VoluntaryDTO() { VoluntaryId = voluntary.VoluntaryId, UserId = voluntary.UserId, IsApproved = voluntary.IsApproved, Name = voluntary.Name, Email = voluntary.Email, Password = voluntary.Password, Phone = voluntary.Phone, SocialNetwork = voluntary.SocialNetwork, Affinities = AffinityAdapter.ListToDTO(voluntary.Affinities), Address = new AddressDTO() { AddressId = voluntary.Address.AddressId, CEP = voluntary.Address.CEP, Avenue = voluntary.Address.Avenue, Number = voluntary.Address.Number, Neighborhood = voluntary.Address.Neighborhood, City = voluntary.Address.City, State = voluntary.Address.State } }); }
public static EventDTO ToDTO(Event sEvent) { return(new EventDTO() { EventId = sEvent.EventId, Title = sEvent.Title, Description = sEvent.Description, Date = sEvent.Date, Affinities = AffinityAdapter.ListToDTO(sEvent.Affinities), Address = new AddressDTO() { AddressId = sEvent.Address.AddressId, CEP = sEvent.Address.CEP, Avenue = sEvent.Address.Avenue, Number = sEvent.Address.Number, Neighborhood = sEvent.Address.Neighborhood, City = sEvent.Address.City, State = sEvent.Address.State } }); }
public static DonationDTO ToDTO(Donation donation) { return(new DonationDTO() { DonationId = donation.DonationId, UserId = donation.UserId, Title = donation.Title, Description = donation.Description, Quantity = donation.Quantity, TakeDonation = donation.TakeDonation, Affinities = AffinityAdapter.ListToDTO(donation.Affinities), Address = new AddressDTO() { AddressId = donation.Address.AddressId, CEP = donation.Address.CEP, Avenue = donation.Address.Avenue, Number = donation.Address.Number, Neighborhood = donation.Address.Neighborhood, City = donation.Address.City, State = donation.Address.State } }); }