LINQ Update List using JOIN with AND Condition There is a direct way to update a collection list by joining with another but that is based on only one column and which will be ultimate thing to JOIN on. But how we can update if we need to compare more than one column ? We can join using AND query for which we need to join with first column and then where clause with second column to update. Below is detailed example for JOIN and Update based on 2 columns. Demo of same is given below. Classes definition public class clsPlayers { public int intId { get ; set ; } = 0 ; public string strPlayerName { get ; set ; } = "" ; public string strPosition { get ; set ; } = "" ; public string strRole { get ; set ; } = "" ; public string strGrade { get ; set ; } = "" ; } public class clsPositions { public string strGrade { get ; set ; } = "" ; ...
Hello all, you all must have come across lot of code suggestions, answers for your various queries regarding reusable libraries of server side languages and NoSql Databases. But many of those suggestions have code which is specific to that Database, tables, collections. How about writing library which is dynamic and can work with any collection, any field to query upon ? Yes below is an example of .Net Core and MongoDB reusable dynamic library which is generic and you can use it with any collection. It can be the base for your .net core mongodb generic repository. Please note that this is not for how to fetch values from config cause you know that better than me. This place is to discuss Coding, Sql, NoSql, Technology, Nuclear Warfare and many more and not to repeat what we have already. So let's start learning, Server side language : C# Framework : .Net Core 2.1 Database : MongoDB MongoDB Database first, > use PlayersDB switched to db PlayersDB > show tables tb...