using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using dccdc.Models; using Dapper; namespace dccdc.DAL { public class G_identityDal { public string GetMaxId(string tableName,int needcount) { string res; using (IDbConnection conn = CommHelper.GetSqlConnection()) { int res1 = conn.Query("GetIdentity", new{ @tablename = tableName, @needcount = needcount },null,true,null,CommandType.StoredProcedure).FirstOrDefault(); return res1.ToString(); } //return "1"; } } }