Forum Widgets
Latest Discussions
How do create a matrix formula to calculate in all range (B:F) with this rare condition.
Bom dia família, Preciso criar uma fórmula matricial para calcular quantas vezes essa coincidência aparece em todo o intervalo B:F , de acordo com essas condições ( A) na primeira linha ), ( M) na segunda linha ). Tentei com essas 2 fórmulas, mas conta apenas uma coincidência. Alguém tem alguma sugestão por favor? Desde já, obrigado.SolveddpparnerJan 17, 2022Copper Contributor5.8KViews0likes10Comments"Thread was interrupted from a waiting state" from DbConnectionPool.CleanupCallback
Hi, I'm getting this error, and I'm not able to fix it, or even understand from where it comes. I'm also sure that all my SqlConnection are instanciated with Using (VB.NET), so the Dispose should be called for every one. Does anyone have an idea about the cause? This error started after upgraded the app to the .NET Framework 4.8.1, from 4.6.2. Maybe it's a coincidence... Source: mscorlib; Message: Thread was interrupted from a waiting state.; Data:; StackTrace: at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext) at System.Data.ProviderBase.DbConnectionPool.CleanupCallback(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers(); Regards, PedroPedro-GoncalvesAug 30, 2023Copper Contributor3.2KViews0likes2CommentsEF Core : foreign key column with same name as existing navigation property
I want to use EF Core to map a legacy database. I cannot scaffold as there are hundreds of tables and I am only interested in very few and besides scaffolding generates names for the navigation properties which are not the ones I want. The situation is: I have a required many-to-one relationship linked by a column name that matches the name of the property that I want to give. The code (simplified) is: public class EntityProperty { public ControlType ControlType { get; set; } } public class ControlType { public List<EntityProperty> Properties { get; set; } = new List<EntityProperty>(); } Nothing more is required, eg, I'm not using foreign key properties, just navigation. The problem is, the foreign key column from the EntityProperties table to the ControlTypes is also called ControlType. So, when I try to map it as: builder.HasOne(x => x.ControlType) .WithMany(x => x.Properties) .IsRequired() .HasForeignKey("ControlType"); I want to use EF Core to map a legacy database. I cannot scaffold as there are hundreds of tables and I am only interested in very few. The situation is: I have a required many-to-one relationship linked by a column name that matches the name of the property that I want to give. The code (simplified) is: public class EntityProperty { public ControlType ControlType { get; set; } } public class ControlType { public List<EntityProperty> Properties { get; set; } = new List<EntityProperty>(); } The problem is, the foreign key column from the EntityProperties table to the ControlTypes is also called ControlType. So, when I try to map it as: builder.HasOne(x => x.ControlType) .WithMany(x => x.Properties) .IsRequired() .HasForeignKey("ControlType"); I get the following exception: InvalidOperationException: The property or navigation 'ControlType' cannot be added to the 'EntityProperty' type because a property or navigation with the same name already exists on the 'EntityProperty' type.' The problem is with HasForeignKey, I guess it's because I am adding a shadow property when a "physical" property already exists, but I what I really mean to say is to use a different column name to link the two entities: what I want is to be able to specify a "not standard" column name for the foreign key, which I am not able to. I do not have a foreign key property, only a navigation property, and I do not want to have one.SolvedRicardo PeresMay 20, 2024Copper Contributor2.4KViews0likes1CommentSQL Sever and Apache Log4 vulnerabilities
We use SQL Server 2014 Management Studio, and SQL Server 2015 Reporting Services (SSRS?) on a server that is not owned by us. The operating system is Windows Sever 2012 R2. I did not set up our SQL server. An MS article I found says: SQL Server (on Windows) – all editions Note: If a customer installs Java support and deploys Java Archives (JARs) that depend on the Log4j 2 library, they are advised to upgrade to the latest version or remove the Java Archives (JARs) that require the dependency. Source: https://msrc-blog.microsoft.com/2021/12/11/microsofts-response-to-cve-2021-44228-apache-log4j2/ How do I check if we have installed Java Support? How do I check if we use Java Archives (JARs)? Appreciate any leads.VickyO532Jan 18, 2022Copper Contributor1.6KViews0likes1Comment关于文件读取
大家好: 请问一下,假如一个文件夹里有上万的文件,当我开发程序,使用方法创建一个文件流时,传入文件的路径,系统找到这个文件是否需要遍历这上万的文件才找到目标文件? hello everyone: Excuse me, if there are tens of thousands of files in a folder, when I develop a program and use the method to create a file stream, the path of the incoming file. Does the system need to traverse the tens of thousands of files to find the target file?niezhetiMay 08, 2022Copper Contributor1.3KViews0likes4CommentsSQL Server Authentication
I am developing a new windows console app using .Net Core 6 and I have added a reference to System.Data.SQLServer (version 4.8.3) when I go to connect to my Azure SQL database I supply the same connection string that I would when connecting with .NET Framework, however I get an error saying the the authentication parameter is not recognized. Why would this be different? Is there a different process? The parameter is Authentication='Active Directory Integrated'Lee TaylorNov 30, 2021Copper Contributor1.3KViews0likes2CommentsDoes the new Cosmos DB patch API gives us enough reasons to rethink about our designs?
One of the most emphasized rules I have learned from my experience when working with Cosmos DB is that, in your documents, you have to separate the parts which change very often from the parts which are rarely updated. Like for instance, likes count in a post or comment. Whilst the posts content, title, author and tags are less likely to change after being set, it ok to put them together in a single document. But to include the post's likes count was not a good practice as every time the post get liked, shared or commented on, you had to update the whole document, which might not be ideal. Edit: I just selected the SqlClient label because there's no Cosmos DB label and I wasn't able to post without a label. 🤷:male_sign:robertmroboNov 11, 2021Copper Contributor1.1KViews0likes1CommentWindow Service and ODP.NET Managed Driver
So, I am creating a Windows Service using the .Net Framework, the problem is, the ODP.Net Managed Driver woke up in the Application Console, but when I converted it to Windows Service, the ODP.Net Managed Driver did not works and it doesn't. reading from Oracle Database.edisonpebojotDec 06, 2021Copper Contributor1.1KViews0likes0Comments- 杰西2110Feb 01, 2023Copper Contributor665Views0likes1Comment
Types of sdk in .net 6 and their difference
Hi Can we know the difference between these 3 sdk versions in .net 6.0.5 1) SDK 6.0.300 2) SDK 6.0.203 3) SDK 6.0.105 Also if we install SDK 6.0.300 over SDK 6.0.101 ,we will be able to see two versions in control panel . So can you please let us know the difference between these 3 version (SDK 6.0.300,SDK 6.0.203,SDK 6.0.105) of SDKDarshan1385Jul 20, 2022Copper Contributor665Views0likes0Comments
Resources
Tags
- Entity Framework Core8 Topics
- ADO.NET7 Topics
- SqlClient7 Topics
- entity framework6 Topics
- ASP.NET Core1 Topic
- SQLite1 Topic