/// <summary> /// Retrieves a single <see cref="CodeModel" /> instance from the data store. /// </summary> /// <param name="type"> /// The type code which distinctly identifies the type of <see cref="CodeModel" /> instance to be returned. /// </param> /// <param name="codeValue3"> /// The unique value which distinctly identifies the <see cref="CodeModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="CodeModel" /> instance that matches the specified <paramref name="codeValue3" />; or null, if no matching instance can be found. /// </returns> public LocalCodeModel FetchByTypeAndCodeValue3(String codeType, String codeValue3) { CodeRecord record = this.Provider.DataProvider.Common.Code.FetchByTypeAndCodeValue3(codeType, codeValue3); LocalCodeModel model = record == null ? null : new LocalCodeModel(this.Provider, record); return(model); }
/// <summary> /// Creates a new <see cref='CodeModel' /> instance. /// </summary> /// <param name="codeType"> /// The type of the code. /// </param> /// <returns> /// A newly instantiated <see cref='CodeModel' /> instance. /// </returns> public LocalCodeModel Create(String codeType) { LocalCodeModel codeModel = new LocalCodeModel(this.Provider); codeModel.Type = codeType; codeModel.Set(false); return(codeModel); }