예제 #1
0
		public coreModel.Contact Create(coreModel.Contact contact)
		{
			var entity = contact.ToDataModel();
			coreModel.Contact retVal = null;
			using (var repository = _repositoryFactory())
			{
				repository.Add(entity);
				CommitChanges(repository);
			}
			retVal = GetById(entity.Id);
			return retVal;
		}
		public coreModel.Organization Create(coreModel.Organization organization)
		{
			var entity = organization.ToDataModel();
			coreModel.Organization retVal = null;
			using (var repository = _repositoryFactory())
			{
				repository.Add(entity);
				CommitChanges(repository);
			}
            retVal = GetById(entity.Id);
			return retVal;
		}
        public coreModel.Contact Create(coreModel.Contact contact)
        {
            var entity = contact.ToDataModel();

            using (var repository = _repositoryFactory())
            {
                repository.Add(entity);
                CommitChanges(repository);
            }

            _dynamicPropertyService.SaveDynamicPropertyValues(contact);

            var retVal = GetById(entity.Id);
            return retVal;
        }
        public coreModel.Organization Create(coreModel.Organization organization)
        {
            var entity = organization.ToDataModel();

            using (var repository = _repositoryFactory())
            {
                repository.Add(entity);
                CommitChanges(repository);
            }

            _dynamicPropertyService.SaveDynamicPropertyValues(organization);

            var retVal = GetById(entity.Id);
            return retVal;
        }
예제 #5
0
        public coreModel.Contact Create(coreModel.Contact contact)
        {
            var pkMap = new PrimaryKeyResolvingMap();
            var entity = contact.ToDataModel(pkMap);

            using (var repository = _repositoryFactory())
            {
                repository.Add(entity);

                CommitChanges(repository);

                pkMap.ResolvePrimaryKeys();
            }

            _dynamicPropertyService.SaveDynamicPropertyValues(contact);

            var retVal = GetById(entity.Id);
            return retVal;
        }