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关于文件读取
大家好: 请问一下,假如一个文件夹里有上万的文件,当我开发程序,使用方法创建一个文件流时,传入文件的路径,系统找到这个文件是否需要遍历这上万的文件才找到目标文件? 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.3KViews0likes4Comments"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.2KViews0likes2CommentsSQL 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.3KViews0likes2CommentsEF 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.4KViews0likes1CommentSubject: Help & Support Case for ADO.NET Entity Framework back end changes & front end changes with
sync to Model & Database respectively. Help & Support Case From, Abhay Sakunde, Cognizant India Pvt. Ltd. Pune Project Team: MWS CWS Apps Team E-mail ID: (email removed for privacy reasons) Mobile No.: (phone number removed for privacy reasons) To, The Manager, Human Resources Or Development Team, Microsoft India Pvt. Ltd. Pune Subject: Help & Support Case for ADO.NET Entity Framework back end changes & front end changes with sync to Model & Database respectively. Hi Team, Initially using Entity Workflows: Program / Model / Database Priority, we do the design of ADO.NET Entity Data Model & development of database. But once initial process is done if any changes occur either as back end changes into database or front end changes into model then how we can manage or do synchronization between ADO.NET Entity Data Model & Database? How it is done with respect to different type of Entity Workflows i.e. Program / Model / Database Priority? There are following options like Update Model From Database Generate Database From Model In case of Entity Workflows - Model Priority, Initially Model is designed & database is generated. Now if model is changed only then option Generate Database From Model will work either to update existing database or new Database will get created? Please Clarify. In case of Entity Workflows - Database Priority, Initially database exists & model design is generated. Now, if model is changed only then option Generate Database From Model will work either to update existing database or new Database will get created? Please Clarify. Waiting for reply. Please let me know if any detail information required for mentioned feature. Screens: [1] Model & Database Options Thanks & Regards, Abhay SakundeABHAY_SAKUNDEApr 18, 2023Copper Contributor626Views0likes1Comment- 杰西2110Feb 01, 2023Copper Contributor665Views0likes1Comment
SQL 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.6KViews0likes1CommentDoes 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.1KViews0likes1Comment
Resources
Tags
- Entity Framework Core8 Topics
- ADO.NET7 Topics
- SqlClient7 Topics
- entity framework6 Topics
- ASP.NET Core1 Topic
- SQLite1 Topic