internal Guid CreateActivityParty(Entity entity)
 {
     if (entity.GetType() == typeof(Entity))
     {
         entity = GenericMethodCaller.InvokeToEntity(entity, Info);
     }
     return((Guid)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, entity.LogicalName, "Create", this, entity));
 }
        public Guid Create(Entity entity)
        {
            AssertValidForOperation(entity, nameof(Create));
            if (entity.GetType() == typeof(Entity))
            {
                entity = GenericMethodCaller.InvokeToEntity(entity, Info);
            }

            return((Guid)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, entity.LogicalName, nameof(Create), this, entity));
        }
        public void Update(Entity entity)
        {
            AssertValidForOperation(entity, "Update");
            if (entity.GetType() == typeof(Entity))
            {
                entity = GenericMethodCaller.InvokeToEntity(entity, Info);
            }

            GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, entity.LogicalName, "Update", this, entity);
        }
        private EntityCollection RetrieveMultipleInternal(FetchExpression fetchExpression)
        {
            var       s = new XmlSerializer(typeof(FetchType));
            FetchType fetch;

            using (var r = new StringReader(fetchExpression.Query))
            {
                fetch = (FetchType)s.Deserialize(r);
                r.Close();
            }
            return((EntityCollection)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, ((FetchEntityType)fetch.Items[0]).name, "ReadFetchXmlEntities", this, fetch));
        }
 private EntityCollection RetrieveMultipleInternal(QueryByAttribute query)
 {
     return((EntityCollection)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, query.EntityName, "ReadEntitiesByAttribute", this, query));
 }
 private EntityCollection RetrieveMultipleInternal(QueryExpression qe)
 {
     return((EntityCollection)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, qe.EntityName, "ReadEntities", this, qe));
 }
 public Entity Retrieve(string entityName, Guid id, ColumnSet columnSet)
 {
     return((Entity)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, entityName, "Read", this, id, columnSet));
 }
 public void Delete(string entityName, Guid id)
 {
     AssertValidForOperation(entityName, nameof(Delete));
     GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, entityName, nameof(Delete), this, id);
 }
Ejemplo n.º 9
0
 private static Entity GetDatabaseEntity(LocalCrmDatabaseInfo info, string logicalName, Guid id)
 {
     return((Entity)GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(info, logicalName, nameof(GetDatabaseEntity), BindingFlags.NonPublic | BindingFlags.Static, info, id));
 }
Ejemplo n.º 10
0
 private AssignResponse ExecuteInternal(AssignRequest request)
 {
     GenericMethodCaller.InvokeLocalCrmDatabaseStaticGenericMethod(Info, request.Target.LogicalName, "Assign", this, request.Target, request.Assignee);
     return(new AssignResponse());
 }