/// <summary> /// Retrieves a specific <see cref="!:CommunicationsModel" /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref="!:CommunicationsModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="!:CommunicationsModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found. /// </returns> public static Consensus.Contact.Communications FetchById(ConsensusSite site, System.Int64 id) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Contact.ICommunicationsModel model = provider.Contact.Communications.FetchById(id); return(model == null ? null : new Consensus.Contact.Communications(model)); }
/// <summary> /// Creates a new <see cref="!:CommunicationsModel" /> instance. /// </summary> /// <returns> /// A newly instantiated <see cref="!:CommunicationsModel" /> instance. /// </returns> public static Consensus.Contact.Communications Create(ConsensusSite site) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Contact.ICommunicationsModel model = provider.Contact.Communications.Create(); return(model == null ? null : new Consensus.Contact.Communications(model)); }