question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Contract to implementation

See original GitHub issue

Igor, pls, help.

The code in the system is built on the contracts, but not to implement them. How i can mapping contract to implementation DTO, it in order to understand the functional Linq2DB.

Example.

[Table("MyTableA")]
public class A : IA
{ 
   [Identity, Column("Id"), PrimaryKey(1)]
   public Guid Id {get; set;} 
   [Column("Code")]
   public string Code {get;set;}
}

public interface IA : IEntity<Guid>
{
   string Code {get;set;}
}

public interface IEntity<T> { T Id {get;set;} }

To use.

   var ret = from a in db.GetTable<IA>()......

Previously, I used bltulkit. It was FluentMap<TContract> small service could very quickly automapp implementation to contracts. I try use FluentMappingBuilder and

LinqToDbMappingClass<TContract, TEntity> : FluentMappingBuilder
   this.Entity<TEntity>()
                .Entity<TContract>();

or

   mappingSchema.SetConverter<TContract, TEntity>(e => new TEntity());

but they are designed for other

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
sdanylivcommented, Aug 11, 2018

Will post update here. I have to clarify proposed interfaces. I already see weaknesses and possibly i have missed something important.

1reaction
sdanylivcommented, Aug 11, 2018

I think implementing this is not a Rocket Science. But when… We have to find time. Currently i’m busy with fixing bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Fundamentals of Contract Implementation - Fill
A contract implementation process is a set of best practices and guidelines that helps organizations ensure that their contracts are being adhered to....
Read more >
Contract Implementation
Contract Implementation ; Migration, The movement of organisations to a new contract post "go-live". ; Mobilisation, The process of moving from contract award...
Read more >
contract implementation Definition
Implementation Period means the period from the date of signing of the Agreement and up to the issuance of Final Acceptance Certificate for...
Read more >
Contract Implementation
We develop a supplier engagement plan, and a RACI matrix for implementation & future state. At this stage the fully executed contract and...
Read more >
How to develop and implement a new contract ...
Four keys to developing and implementing a new contract management system · 1. Assess the current state of contract management · 2. Get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found