D365.Data.ObjectMapper
1.0.1.3
dotnet add package D365.Data.ObjectMapper --version 1.0.1.3
NuGet\Install-Package D365.Data.ObjectMapper -Version 1.0.1.3
<PackageReference Include="D365.Data.ObjectMapper" Version="1.0.1.3" />
paket add D365.Data.ObjectMapper --version 1.0.1.3
#r "nuget: D365.Data.ObjectMapper, 1.0.1.3"
// Install D365.Data.ObjectMapper as a Cake Addin #addin nuget:?package=D365.Data.ObjectMapper&version=1.0.1.3 // Install D365.Data.ObjectMapper as a Cake Tool #tool nuget:?package=D365.Data.ObjectMapper&version=1.0.1.3
Description
This library helps about Microsoft.Xrm.Sdk.Entity or Microsoft.Xrm.Sdk.EntityCollection objects convert to your custom class objects and generic collections like list,hashset,queue,stack or collection and parse your custom class objects to Microsoft.Xrm.Sdk.Entity.Library designed for only Microsoft.Xrm.Sdk.Entity or Microsoft.Xrm.Sdk.EntityCollection mapping and parsing
Attributes
Basic Usages :
Attributes helps to design our custom classes more flexible
[Schema("contact")]// specifies entity schema name
public class Contact
{
[PrimaryKey] // maps entity , id prop name not important and property type must be guid
public Guid ContactId { get; set; }
[MapFrom("emailaddress1")]// maps entity attribute's emailaddress1 , property name not important
public string Email { get; set; }
[MapFrom("mobilephone")]// maps entity attribute's mobilephone , property name not important
public string PhoneNumber { get; set; }
[MapFrom("fullname")]// maps entity attribute's fullname , property name not important
public string FullName { get; set; }
[MapFrom("firstname")]// maps entity attribute's firstname , property name not important
public string FirstName { get; set; }
[MapFrom("lastname")]// maps entity attribute's lastname , property name not important
public string LastName { get; set; }
[MapFrom("birthdate")]// maps entity attribute's birthdate , property name not important
public DateTime BirtDate { get; set; }
[MapFrom("parentcustomerid")]// maps entity attribute's parentcustomerid , property name not important
[Reference("account")]// specifies entityreference schema name and gets reference id
public Guid ParentAccountId { get; set; }
[MapFrom("gendercode")]// maps entity attribute's gendercode , property name not important
[OptionSetAsInt]// if your entity attribute is optionsetvalue use to get value as int
public int Gender { get; set; }
[MapFrom("statuscode")]// maps entity attribute's statuscode , property name not important
[OptionSetAsInt]// if your entity attribute is optionsetvalue use to get value as int
public int Status { get; set; }
[MapFrom("statecode")]// maps entity attribute's statecode , property name not important
[OptionSetAsInt]// if your entity attribute is optionsetvalue use to get value as int
public int State { get; set; }
}
XrmMapper Usage
Please check examples in github repository to detailed description
Basic Usages :
Mapping
EntityCollection entityCollection = _orgService.RetrieveMultiple(query);
List<Contact> contacts = XrmMapper.Map<List<Contact>>(entityCollection);
Entity entity = _orgService.Retrieve("contact", Guid.Parse("{5230B95E-1BD3-EC11-A7B5-000D3A4A5AA4}"), new ColumnSet(true));
Contact contact = XrmMapper.Map<Contact>(entity);
Parsing
Entity contactEntity = contact.ParseToEntity() as Entity;
List<Entity> contactEntityList=contactsList.Select(ct ⇒ ct.ParseToEntity() as Entity).ToList();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
-XrmMapper improved for Microsoft.Xrm.Sdk.Entity or Microsoft.Xrm.Sdk.EntityCollection mapping and parsing.
-Atrributes Error Fixed.
-Performance upgrades.