You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 29, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 29, 2020. It is now read-only.
I could not find anything about mapping calsses that contains sub classes.
[Table("TableA")]
public class ClassA{
[COLUMN("B_ID")]
public BId {get; set;}
[COLUMN("b")]
public ClassB b{get; set;}
}
[Table("TableB")]
public class ClassB{
[COLUMN("ID")]
public Int32 Id{get; set;}
}
How to get this e.g. with a join or how do I load class A with nested B objects, that could have relations like one to one or one to many ?
This isn't currently supported in MicroLite, it's something I'm considering for MicroLite 7.0 but for now you will need to do that additional fetch yourself (the upside is you can choose if & when that occurs) using the Include API
Ok, sorry for the late response, had to recover from the shock ;-) I didn't think about it is not possible in this way. Ok if I use includes, is it possible to log all db sql queries that are made(nlog). So that I can see what is really happening at db level?
I know this question is not helping but do you have release date for the version 7? And will there be a breaking change in this behaviour?
All that happens is 2 or more individual queries are sent to the database server as a single request over a single connection and the results are returned in separate datasets which are then parsed into objects and made available to the caller.
As far as logging the traffic, queries aren't written to the log to avoid sensitive data being stored but you can use something like the profiler in MS SQL Server to see what requests are made.
Thanks for the reply and for the detailed information. I appreciate your project, and I try to avoid entity framework as long as I can, but need a good alternative. I think yours is getting more a really good one.
Last thing before I close the issue (question).
I asked about logging each sql query that is applied to the db, is this possible?
Activity
TrevorPilley commentedon Mar 14, 2017
This isn't currently supported in MicroLite, it's something I'm considering for MicroLite 7.0 but for now you will need to do that additional fetch yourself (the upside is you can choose if & when that occurs) using the Include API
frankiDotNet commentedon Mar 14, 2017
Ok, sorry for the late response, had to recover from the shock ;-) I didn't think about it is not possible in this way. Ok if I use includes, is it possible to log all db sql queries that are made(nlog). So that I can see what is really happening at db level?
I know this question is not helping but do you have release date for the version 7? And will there be a breaking change in this behaviour?
TrevorPilley commentedon Mar 14, 2017
All that happens is 2 or more individual queries are sent to the database server as a single request over a single connection and the results are returned in separate datasets which are then parsed into objects and made available to the caller.
As far as logging the traffic, queries aren't written to the log to avoid sensitive data being stored but you can use something like the profiler in MS SQL Server to see what requests are made.
TrevorPilley commentedon Mar 14, 2017
There's no firm time frame for 7.0 at the moment, I'm finishing the OData 4.0 work in the WebApi extension before I pick up on 7.0.
There may well be breaking changes in 7.0 but those will be detailed in the release notes and on the blog once known.
frankiDotNet commentedon Mar 15, 2017
Thanks for the reply and for the detailed information. I appreciate your project, and I try to avoid entity framework as long as I can, but need a good alternative. I think yours is getting more a really good one.
Last thing before I close the issue (question).
I asked about logging each sql query that is applied to the db, is this possible?
TrevorPilley commentedon Mar 15, 2017
Not in MicroLite itself, the standard way to do that is with the profiling tools that are part of the database server e.g. SQL Server Profiler