コード例 #1
0
        public void CreateAssociateDocumentRequired(int associateId, int docType)
        {
            if (!this.MomentaDb.AssociateDocumentRequired.Where(adr => adr.AssociateId == associateId && adr.DocumentTypeId == docType).Any())
            {
                var associateDocumentRequired = new AssociateDocumentRequired();
                associateDocumentRequired.AssociateId    = associateId;
                associateDocumentRequired.DocumentTypeId = docType;

                this.MomentaDb.AssociateDocumentRequired.AddObject(associateDocumentRequired);
                this.MomentaDb.SaveChanges();
            }
        }
コード例 #2
0
ファイル: Sample3.cs.cs プロジェクト: itvijaykumar/MRTest
        public void CreateAssociateDocumentRequired(int associateId, int docType)
        {
            if (!this.MomentaDb.AssociateDocumentRequired.Where(adr => adr.AssociateId == associateId && adr.DocumentTypeId == docType).Any())
            {
                var associateDocumentRequired = new AssociateDocumentRequired();
                associateDocumentRequired.AssociateId = associateId;
                associateDocumentRequired.DocumentTypeId = docType;

                this.MomentaDb.AssociateDocumentRequired.AddObject(associateDocumentRequired);
                this.MomentaDb.SaveChanges();
            }
        }