1234567891011121314151617181920212223242526272829303132333435 |
- using Luticate2.Utils.DataAccess;
- using Test.Utils.DataAccess.Models;
- using Test.Utils.Dbo.PkBigSerial;
-
- namespace Test.Utils.DataAccess
- {
- public class LuUtilsPkBigSerialDataAccess : LuEfCrudDataAccess<pk_bigserial, PkBigSerialAddDbo, PkBigSerialDbo, PkBigSerialAddDbo, LuUtilsDbContext>
- {
- public LuUtilsPkBigSerialDataAccess(LuUtilsDbContext db) : base(db, db.pk_bigserial)
- {
- }
-
- protected override pk_bigserial GetModelFromTCreate(PkBigSerialAddDbo obj)
- {
- return GetModelFromTUpdate(obj, new pk_bigserial());
- }
-
- protected override void EditModelFromTUpdate(PkBigSerialAddDbo obj, pk_bigserial model)
- {
- model.some_int = obj.SomeInt;
- model.some_text = obj.SomeText;
- }
-
- protected override PkBigSerialDbo GetDboFromModel(pk_bigserial model)
- {
- return new PkBigSerialDbo
- {
- CreatedAt = model.created_at,
- Id = model.id,
- SomeInt = model.some_int,
- SomeText = model.some_text
- };
- }
- }
- }
|