Пример #1
0
        public async Task <StaffEducationOrganizationAssignmentAssociationModel> Delete(StaffEducationOrganizationAssignmentAssociationModel staff)
        {
            var entity = MapStaffEducationOrganizationAssignmentAssociationModelToStaffEducationOrganizationAssignmentAssociationEntity(staff);

            Persistence.Models.StaffEducationOrganizationAssignmentAssociation result = new Persistence.Models.StaffEducationOrganizationAssignmentAssociation();

            result = await _queries.Delete(entity);

            var model = MapStaffEducationOrganizationAssignmentAssociationEntityToStaffEducationOrganizationAssignmentAssociationModel(result);

            return(model);
        }
Пример #2
0
 private Persistence.Models.StaffEducationOrganizationAssignmentAssociation MapStaffEducationOrganizationAssignmentAssociationModelToStaffEducationOrganizationAssignmentAssociationEntity(StaffEducationOrganizationAssignmentAssociationModel model)
 {
     return(new Persistence.Models.StaffEducationOrganizationAssignmentAssociation
     {
         Id = model.Id,
         BeginDate = model.BeginDate,
         EducationOrganizationId = model.EducationOrganizationId,
         StaffClassificationDescriptorId = model.StaffClassificationDescriptorId,
         StaffUSI = model.StaffUSI,
         PositionTitle = model.PositionTitle,
         EndDate = model.EndDate,
         OrderOfAssignment = model.OrderOfAssignment,
         EmploymentEducationOrganizationId = model.EmploymentEducationOrganizationId,
         EmploymentStatusDescriptorId = model.EmploymentStatusDescriptorId,
         EmploymentHireDate = model.EmploymentHireDate,
         CredentialIdentifier = model.CredentialIdentifier,
         StateOfIssueStateAbbreviationDescriptorId = model.StateOfIssueStateAbbreviationDescriptorId,
         Discriminator = model.Discriminator,
         CreateDate = model.CreateDate,
         LastModifiedDate = model.LastModifiedDate
     });
 }
Пример #3
0
        public async Task <StaffEducationOrganizationAssignmentAssociationModel> Save(StaffEducationOrganizationAssignmentAssociationModel staff)
        {
            var entity = MapStaffEducationOrganizationAssignmentAssociationModelToStaffEducationOrganizationAssignmentAssociationEntity(staff);

            Persistence.Models.StaffEducationOrganizationAssignmentAssociation result = new Persistence.Models.StaffEducationOrganizationAssignmentAssociation();

            entity.LastModifiedDate = DateTime.Now;

            if (entity.Id == null)
            {
                entity.CreateDate = DateTime.Now;
                result            = await _queries.Add(entity);
            }
            else
            {
                result = await _queries.Update(entity);
            }

            var model = MapStaffEducationOrganizationAssignmentAssociationEntityToStaffEducationOrganizationAssignmentAssociationModel(result);

            return(model);
        }