MongoRepo 1.0.5
See the version list below for details.
dotnet add package MongoRepo --version 1.0.5
NuGet\Install-Package MongoRepo -Version 1.0.5
<PackageReference Include="MongoRepo" Version="1.0.5" />
paket add MongoRepo --version 1.0.5
#r "nuget: MongoRepo, 1.0.5"
// Install MongoRepo as a Cake Addin #addin nuget:?package=MongoRepo&version=1.0.5 // Install MongoRepo as a Cake Tool #tool nuget:?package=MongoRepo&version=1.0.5
Suppose you want to add student data into the mongodb database.
Create a “Student” entity model. Then you have to add an interface “IStudnetManager” and inherit “ICommonManager” with set your model name.
interface IStudentManager:ICommonManager<Student>
{
}
If you need another custom method for your custom logic then you can add definition in this interface.Other wise it will be empty when you feel the need to write a new method then add method definition. Note : You have to add 2 namespaces using MongoRepo.Interfaces.Manager;
Create a class “StudentRepository” inherited from “CommonRepository” class with a set Student model. Sample class. class StudentRepository:CommonRepository<Student> { Public StudentRepository():base(new ApplicationDbContext(“dbconnection”,”db name”)) { } }
Note : You have to add 2 namespaces using MongoRepo.Context; using MongoRepo.Repository;
3.Create a class “StudentManager” inherited from “CommonManager” class with a set Student model and also inherit “IStudentManager” and create “StudentManger” constructor using StudentRepository object. Sample class.
class StudentManager:CommonManager<Student>,IStudentManager { public StudentManager() : base(new StudentRepository()) { } } Note : You have to add 3 namespaces using CRUDMongoDb.Interfaces.Manager; using CRUDMongoDb.Repository; using MongoRepo.Manager;
Finally you have to create an object “StudentManager” class then find all of the methods for CRUD operation. StudentManager _studentManager=new StudentManager() For student single entry _studentManager.Add(studentObject); For student collection entry _studentManager.Add(studentObjectList); For student data modify _studentManager.Update(id,studentObject); For delete student _studentManager.Delete(id); Get one single object studentManager.GetById(); Get all data studentManager.GetAll();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.5 is compatible. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net452 is compatible. net46 is compatible. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.2
- MongoDB.Driver (>= 2.10.0)
-
.NETFramework 4.5.2
- MongoDB.Driver (>= 2.10.0)
-
.NETFramework 4.6
- MongoDB.Driver (>= 2.10.0)
-
.NETFramework 4.6.1
- MongoDB.Driver (>= 2.10.0)
-
.NETFramework 4.7.2
- MongoDB.Driver (>= 2.10.0)
-
.NETStandard 1.5
- MongoDB.Driver (>= 2.10.0)
- NETStandard.Library (>= 1.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.