public virtual void Delete(Guid id) { var retrieval = Retrieval.ForEntity <TEntity>(id); var entity = Client.Retrieve(retrieval); Client.Delete(entity); }
public static DataAccessAction DeleteBuild(Guid id) { return(new DataAccessAction((ICrmPlusPlus crm) => { var retrieval = Retrieval.ForEntity <Build>(id); var build = crm.EntityClient.Retrieve(retrieval); crm.EntityClient.Delete(build); })); }
public static DataAccessAction <Build> GetBuild(Guid id) { return(new DataAccessAction <Build>((ICrmPlusPlus crm) => { var retrieval = Retrieval .ForEntity <Build>(id) .IncludeAllColumns(true); var build = crm.EntityClient.Retrieve(retrieval); build.Password = Protector.UnprotectString(build.Password); return build; })); }
public virtual TDomainComponent Get(Guid id, Retrieval <TEntity> retrieval = null) { if (retrieval == null) { retrieval = Retrieval .ForEntity <TEntity>(id) .IncludeAllColumns(true); } var entity = Client.Retrieve(retrieval); var domainComponent = Activator.CreateInstance <TDomainComponent>(); domainComponent.Entity = entity; return(domainComponent); }