12345678910111213141516171819202122232425262728293031 |
- using Microsoft.Extensions.Caching.Memory;
- using Microsoft.Extensions.Primitives;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using ZcPeng.PublicLibrary;
- namespace CoreEntity.DAL
- {
- public class BaseDAL
- {
- private static IMemoryCache _cache;
- public BaseDAL(IMemoryCache cache)
- {
- _cache = cache;
- }
- public static int GetId(string tablename)
- {
- Object id ;
- string result = "";
- DataAccess.GetOneValue("SELECT IDENT_CURRENT('"+ tablename + "') as newid",out id,out result);
- Decimal id1 = (Decimal)id;
- return Decimal.ToInt32(id1);
- }
- }
- }
|