1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Luticate2.Auth.DataAccess.Models;
- using Luticate2.Auth.Dbo.Groups;
- using Luticate2.Utils.DataAccess;
-
- namespace Luticate2.Auth.DataAccess
- {
- public class LuGroupsDataAccess : LuEfCrudDataAccess<lu_groups, LuGroupsAddDbo, LuGroupsDbo, LuGroupsAddDbo, LuDatabaseContext>
- {
- public LuGroupsDataAccess(LuDatabaseContext db)
- : base(db, db.lu_groups)
- {
- }
-
- public string Get()
- {
- return "groups";
- }
-
- protected override lu_groups GetModelFromTCreate(LuGroupsAddDbo obj)
- {
- return new lu_groups
- {
- name = obj.Name
- };
- }
-
- protected override lu_groups GetModelFromTUpdate(LuGroupsAddDbo obj)
- {
- return GetModelFromTCreate(obj);
- }
-
- protected override LuGroupsDbo GetDboFromModel(lu_groups model)
- {
- return new LuGroupsDbo
- {
- Id = model.id.ToString(),
- Name = model.name
- };
- }
- }
- }
|