Questions tagged [valueinjecter]

ValueInjecter lets you define your own convention-based matching algorithms (ValueInjections) in order to match up (inject) source values to destination values.

ValueInjecter lets you define your own convention-based matching algorithms (ValueInjections) in order to match up (inject) source values to destination values.

Source code: https://github.com/omuleanu/ValueInjecter

151 questions
2
votes
1 answer

ValueInjecter How do I update code from V2.4 to V3.2, no Convention Injection

I'm working on the upgrade of an application from net framework to .net core 3.0. I am using windows presentation foundation Wpf and I want to implement ValueInjecter in its last version 3.2... The application is currently running on version 2.4 of…
Dejosel
  • 95
  • 2
  • 8
2
votes
0 answers

ClickOnce silent installer doesn't recognize library referred through NuGet package

I have C# winforms project setup under Visual Studio 2015. I also have 3 differnt windows service project under same solution. I used Omu.ValueInjecter for auto mapping argument to class. I have added installer project that is basically uses Click…
CSharpDev
  • 370
  • 1
  • 7
  • 28
2
votes
1 answer

ValueInjecter with IQueryable

I need to map IQueryable to IQueryable with ValueInjecter. Is this possible? I tried: return userRepo.GetUsers() .Select(o => new SimpleUser().InjectFrom(o)) .Cast(); But this cannot be…
Shawn Mclean
  • 56,733
  • 95
  • 279
  • 406
2
votes
1 answer

Can't get ValueInjecter to map COM objects

See the following code. The test passed when using AutoMapper, but failed when using ValueInjecter: using NetFwTypeLib; [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { INetFwPolicy2 policy =…
user593358
2
votes
1 answer

ValueInjecter question

After working with AutoMapper I came across ValueInjecter on this site. I am trying it out but I am stuck on what is probably a very simple scenario. But before I dig into the code sample, does anyone know if ValueInjecter works in a Medium-Trust…
NYCChris
  • 649
  • 5
  • 13
2
votes
2 answers

ViewModel objects to EF model entities conversion where?

I currently have a repository based on Entity Framework v4 entities (CRUD and GET operations implemented). I'm in the process of creating the corresponding View Models for these entities. Where should I put the conversion/mapping between them? In…
mare
  • 13,033
  • 24
  • 102
  • 191
2
votes
2 answers

Linq select to injected object with Valueinjecter

Can I convert a IQueryable result to a injected object on the fly? I know I can do this with the help of Valueinjecter: usercategory uc1 = new usercategory(example); usercategoryViewData ucVD1 = new usercategoryViewData(); ucVD1.injectFrom(uc1); So…
joeriks
  • 3,382
  • 8
  • 32
  • 42
2
votes
1 answer

Is it possible to map a IDataReader to a nested DTO using automapper?

I was hoping that I could map a flat datareader into a nested DTO. Running the following code the name is null. Am I doing something wrong or is this just not possible? class Program { public class Person { public int id { get;…
Dan Ryan
  • 624
  • 7
  • 24
2
votes
1 answer

Mapping a string Array to an Object using ValueInjecter

I'm looking for suggestions on how I might solve the following problem using ValueInjecter. NOTE: Before anyone jumps in and a) tells me I'm doing it wrong or b) tells me I shouldn't be using ValueInjecter - please don't. beacuse a) I have no…
shawty
  • 5,729
  • 2
  • 37
  • 71
2
votes
1 answer

Custom property in View Model with valueinjector in TPT inheritance project

I am having a viewmodel which uses valueinjector to inject the values from models (I have also implemented TPT inheritance). During this process, due to one of my custom property (Property that is not in the model source), I keep on getting the…
Bibek Maharjan
  • 549
  • 2
  • 5
  • 15
2
votes
1 answer

Mapping different property values using value injector

I have a table derived from base class. So, the derived table will have same id as base table. like public class Animal { public int AnimalId{get; set;} public string Name{get;set;} } public class Man:Animal { //Primary key as well as foreign key…
2
votes
1 answer

ValueInjecter injecting from a method

Is it posible to inject a value from a method using ValueInjecter ? Similar to what AutoMapper do (GetTotal()) : https://github.com/AutoMapper/AutoMapper/wiki/Flattening Thanks
Paul
  • 12,359
  • 20
  • 64
  • 101
2
votes
1 answer

Copy nancyfx response's cookie and header without foreach

In IResponseProcessor.Process string format = context.Request.Query["format"].Value ?? "json"; format = format.ToLower(); Response response; switch (format) { case "protbuf": response = // balabalabala break; case "yaml": …
wener
  • 7,191
  • 6
  • 54
  • 78
2
votes
1 answer

Auto Mapping Internal Service References

I am creating a c# library that uses service references. I don't want the entire service to be accessible outside the library. So I first used AutoMapper to copy the service classes that I needed in to similar classes in my library. The second step…
pixelshaded
  • 313
  • 1
  • 2
  • 10
2
votes
1 answer

Using ValueInjecter, can I inject into private properties?

Is there any Injection in ValueInjecter that injects into private properties?
Erik Z
  • 4,660
  • 6
  • 47
  • 74