using System.Data.Entity; using iiie.Logs.DBO; using iiie.WebApiUtils.BusinessManager; using iiie.WebApiUtils.DBO; using WebAPiUtils_test.DBO; namespace WebAPiUtils_test.DataAccess { public class ValuesManager : SqlServerManager { public override DbSet GetTable(SqlServerManagerEntities db) { return db.T_SqlManager; } public override ValuesDboGet DbToDboGet(T_SqlManager obj) { return new ValuesDboGet { Id = obj.id, MyInt = obj.my_int, MyString = obj.my_string, Text = obj.T_Text.text, TextId = obj.text }; } public override T_SqlManager DboAddToDb(ValuesDboAdd obj) { return new T_SqlManager { my_string = obj.MyString, my_int = obj.MyInt, text = obj.TextId }; } public override T_SqlManager DboEditToDb(ValuesDboEdit obj, T_SqlManager edit) { return new T_SqlManager { id = edit.id, my_string = obj.MyString, my_int = obj.MyInt, text = obj.TextId }; } public static OpResult> Contains(string text, int page, int perPage) { return GetMultiple(x => x.my_string.Contains(text), x => x.id, page, perPage); } } }