All Projects → DogusTeknoloji → Batmap

DogusTeknoloji / Batmap

Licence: mit
🦇 Convention-based, fast object mapper.

Projects that are alternatives of or similar to Batmap

awesome-maps-ukraine
A curated list of maps of Ukraine, ukrainian mappers and tools that they use or develop for creating and publish maps
Stars: ✭ 35 (-83.33%)
Mutual labels:  mapping, mapper
orika-spring-boot-starter
Spring Boot Starter for Orika.
Stars: ✭ 116 (-44.76%)
Mutual labels:  mapping, mapper
JSONUtilities
Easily load JSON objects and decode them into structs or classes
Stars: ✭ 57 (-72.86%)
Mutual labels:  mapping, mapper
polymorphia
A very fast POJO codec for MongoDB (used in conjunction with the Mongo Java Driver) that handles generic types as well as polymorphic class hierarchies
Stars: ✭ 21 (-90%)
Mutual labels:  mapper, entity
Object Mapper
ObjectMapper is a class for automatic object mapping in Python
Stars: ✭ 72 (-65.71%)
Mutual labels:  mapper, mapping
Poiji
🍬 A tiny library converting excel rows to a list of Java objects based on Apache POI
Stars: ✭ 255 (+21.43%)
Mutual labels:  mapper, mapping
SimpleCurd
2个类,实现类ActiveRecord,无需写Mapper, mybatis增强
Stars: ✭ 14 (-93.33%)
Mutual labels:  mapper, entity
Bull
BULL - Bean Utils Light Library
Stars: ✭ 150 (-28.57%)
Mutual labels:  mapper, mapping
Mappinggenerator
🔄 "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Stars: ✭ 831 (+295.71%)
Mutual labels:  mapper, mapping
Agilemapper
A zero-configuration, highly-configurable, unopinionated object mapper with viewable execution plans. Flattens, unflattens, deep clones, merges, updates and projects queries. Targets .NET 3.5+ and .NET Standard 1.0+
Stars: ✭ 345 (+64.29%)
Mutual labels:  mapper, mapping
Mapster
A fast, fun and stimulating object to object Mapper
Stars: ✭ 1,375 (+554.76%)
Mutual labels:  mapper, mapping
Jmapper Core
Elegance, high performance and robustness all in one java bean mapper
Stars: ✭ 159 (-24.29%)
Mutual labels:  mapper, mapping
Chatbot Watson Android
An Android ChatBot powered by Watson Services - Assistant, Speech-to-Text and Text-to-Speech on IBM Cloud.
Stars: ✭ 169 (-19.52%)
Mutual labels:  entity
Fiesta
Fast Incremental Euclidean Distance Fields for Online Motion Planning of Aerial Robots
Stars: ✭ 182 (-13.33%)
Mutual labels:  mapping
Excelmapper
Map POCO objects to Excel files
Stars: ✭ 166 (-20.95%)
Mutual labels:  mapper
Azuremapscodesamples
A set of code samples for the Azure Maps web control.
Stars: ✭ 167 (-20.48%)
Mutual labels:  mapping
Geoserver
Official GeoServer repository
Stars: ✭ 2,573 (+1125.24%)
Mutual labels:  mapping
Entityplus
A C++14 Entity Component System
Stars: ✭ 181 (-13.81%)
Mutual labels:  entity
Storedprocedureefcore
Entity Framework Core extension to execute stored procedures
Stars: ✭ 164 (-21.9%)
Mutual labels:  mapping
Htframework
Unity HTFramework, a rapid development framework of client to the unity.
Stars: ✭ 179 (-14.76%)
Mutual labels:  entity

BatMap - The Mapper we deserve, not the one we need.

🦇 BatMap Opininated (yet another) mapper, mainly to convert between EF Entities and DTOs.

Supports .Net Standard 1.0.

Build status Coverage Status NuGet Badge Join the chat at https://gitter.im/NaNaNaNaBatMap/Lobby GitHub issues GitHub license

GitHub stars GitHub forks

Let's first obey the number one rule for mappers, a benchmark (using BenchmarkDotNet):

Method Mean
HandWritten 1.143 ms
BatMap 💥 2.000 ms
SafeMapper 2.933 ms
Mapster 2.942 ms
AutoMapper 3.497 ms
TinyMapper 4.172 ms
ExpressMapper 6.955 ms
FastMapper 9.203 ms

Results may (probably) vary. Latest run can bee seen on Appveyor Build.

  • Fast (enough)
  • NOT over-engineered, code is really simple
  • Instantiatable mapper
  • Convention based, zero configuration static shortcut exists too (obviously named Mapper)
  • Does not crash when faced with circular-dependencies during registration
  • In fact, can resolve recurring instances to same target instance (yaay no StackOverflowException!)
  • Can project IQueryable<TSource> to IQueryable<TTarget> with respect to includes (via auto-detection or with custom parameters)
  • and much more...

API

Registration with static API:

Mapper.RegisterMap<Customer, CustomerDTO>();

or use an instance:

var mapper = new MapConfiguration(dynamicMapping: DynamicMapping.MapAndCache, preserveReferences: true);
mapper.RegisterMap<Customer, CustomerDTO>();

Note: You don't have to register type mappings when using a MapConfiguration with Dynamic Mapping enabled (like the static API uses).

You can customize expressions for members:

mapper.RegisterMap<Order, OrderDTO>(b => b.MapMember(o => o.Price, (o, mc) => o.Count * o.UnitPrice));

Map an object:

Mapper.Map<CustomerDTO>(customer);

Map an enumerable:

customers.MapTo<Customer, CustomerDTO>(preserveReferences: true);  // extension methods FTW!

Project a query:

customerQuery.ProjectTo<CustomerDTO>(checkIncludes: true);

or with expanding specific navigations:

customerQuery.ProjectTo<Customer, CustomerDTO>(c => c.Addresses, c => c.Orders);

Note: If you want to change mapping behavior, create a class that inherits from ExpressionProvider, override CreateMemberBinding and inject an instance of your class to MapConfiguration.

Where can I get it?

You can install BatMap from the package manager console:

PM> Install-Package BatMap

Documentation

You might want to visit wiki for more.


Developed with ❤️ at Doğuş Teknoloji.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].