WibblyWobbly
WibblyWobbly
CC#
Created by WibblyWobbly on 5/26/2023 in #help
❔ Expression<Func> using Reflection
Thank you!
7 replies
CC#
Created by WibblyWobbly on 5/26/2023 in #help
❔ Expression<Func> using Reflection
Yes this is where I got to:
ParameterExpression parameter = Expression.Parameter(type, "m");
Expression<Func<T, object>> lambdaExpression = Expression.Lambda<Func<T, object>>(
Expression.Property(parameter, "WorkRequestItems"), parameter);
ParameterExpression parameter = Expression.Parameter(type, "m");
Expression<Func<T, object>> lambdaExpression = Expression.Lambda<Func<T, object>>(
Expression.Property(parameter, "WorkRequestItems"), parameter);
It works in retrieving the data, the return format in the json isn't quite there yet but that might just be me.
7 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Well according to the article you posted above the Mindbox.Data.Linq library allows you to use the system.data.linq name space so maybe this could work. So then porting into a .NET Standard class library is also possible, so I'll give it a go. Thanks for your help 🙂
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
It also references another .NET 4.8 class library.
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Well all the data context in written using LINQ-To-SQL which i'm guessing is what system.data.linq is used for.
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Hmmm ok. So I'm not sure what the best approach might be then. This is where I was going in circles. The DAL written in .NET Framework is huge and our first steps into migrating everything to core, was we wanted to put it behind an API. We were hoping it could be a .NET Core API that could reference the .NET Framework 4.8 DAL (by means of .net std), query the data context etc. But thats not possible ?
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Which is great, so Im basically using a .NET 7 API to call a .NET Framework 4.8 Data Context with Standard as the middle man. However it says it requires System.Data.Linq
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Well that makes sense. However I though .NET Standard could be used to "join" .NET Core and .NET Framework together
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
When I use Mindbox.Data.Linq I get Could not load file or assembly 'System.Data.Linq, Version=4.0.0.0
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
No that's only when reference System.Data.Linq directly
23 replies
CC#
Created by WibblyWobbly on 12/1/2022 in #help
❔ Migration from .NET Framework 4.8 to .NET7, Need .NET Standard?
Yeah which is why I tried "Mindbox.Data.Linq" which apparently is "A clone of Microsoft System.Data.Linq to allow multi-DLL extensibility and EF compatibility." to use in .NET Standard. However when I try to access the .NET Framework 4.8 code in the .NET Standard
public void GetDevies()
{
DeviceFrameworkLogic deviceFramework = new DeviceFrameworkLogic();
deviceFramework.GetDevies(); // <- exception thrown on this line.
}
public void GetDevies()
{
DeviceFrameworkLogic deviceFramework = new DeviceFrameworkLogic();
deviceFramework.GetDevies(); // <- exception thrown on this line.
}
I continue to get the exception. So I'm unsure how too approach this.
23 replies
CC#
Created by WibblyWobbly on 10/28/2022 in #help
MediatR and CQRS for basic logic
Great thanks 🙂
5 replies