Base Repository
https://drive.google.com/file/d/1-2M7YotJQ1Q31XZB32l8nt70wbqnCE7t/view?usp=sharing
Monday, May 30, 2022
MongoDb and C sharp
Tuesday, May 24, 2022
Mongo db query
Query
> use s27_events
- SELECT * FROM Profile
db.Profile.find ({}) - SELECT * FROM Profile WHERE Name = "Chamith"
db.Profile.find({Name:"Chamith"}) - SELECT * FROM Profile WHERE Name = "Chamith" AND Dob = "1988-01-24" AND Setting.Security._2fa = false
db.Profile.find({Name:"Chamith",Dob:"1988-01-24",Setting:{Security:{_2fa:false}}})
Update
update/add a new field to the collection
db.Profile.update({},{$set:{ProfileImage:"chamith.png"}})
db.Profile.update({},{$unset:{ProfileImage:"chamith.png"}})
db.Profile.update({},{$set:{ProfileImage:[{Url:"chamith1",IsDefault:false},{Url:"chamith2",IsDefault:true}]}})
db.Profile.update({},{$set:{Setting:{Security:{ _2fa:false}}}})
db.Profile.update({_id:ObjectId('628cae92a72e5e4316a8a8a5')},{$set:{Setting:{Preferences:{Country:"Sri Lanka",Currency:"LKR"},Security:{_2fa:true}}}})
Subscribe to:
Posts (Atom)
-
Dapper - a simple object mapper for .Net https://github.com/StackExchange/dapper-dot-net/blob/master/Readme.md Install-Package Dappe...
-
Name space using FluentMigrator; ADD COLOM AS SQL STATEMENT Execute . Sql( @" IF NOT EXISTS(SELECT * FROM sys.columns ...
-
csHtml file @{ ViewBag.Title = "Combobox"; } <h2>Combobox</h2> <div class="demo-section k-conten...