using Luticate2.Auth.DataAccess.Models; using Luticate2.Auth.Dbo.Groups; using Luticate2.Utils.DataAccess; namespace Luticate2.Auth.DataAccess { public class LuGroupsDataAccess : LuEfCrudDataAccess { 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 }; } } }