internal static async Task <List <Tables.dbo.Work> > List(string site) { await using var cmd = new SqlCommand("[dbo].[GetWorks]", new Base().SqlConnection) { CommandType = CommandType.StoredProcedure }; cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site; using var sda = new SqlDataAdapter(cmd); return(Object.GetList <Tables.dbo.Work>(sda)); }
internal static async Task <List <Tables.dbo.Subscriber> > List(string site, int areaId) { await using var cmd = new SqlCommand("[dbo].[GetSubscribersForSiteAreaId]", new Base().SqlConnection) { CommandType = CommandType.StoredProcedure }; cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site; cmd.Parameters.Add("@AreaId", SqlDbType.Int).Value = areaId; using var sda = new SqlDataAdapter(cmd); return(Object.GetList <Tables.dbo.Subscriber>(sda)); }
internal static async Task <List <Tables.dbo.Work> > ListWithTestimonials(string site, int pageIndex, int pageSize) { await using var cmd = new SqlCommand("[dbo].[GetWorksPagingWithTestimonials]", new Base().SqlConnection) { CommandType = CommandType.StoredProcedure }; cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site; cmd.Parameters.Add("@PageIndex", SqlDbType.Int).Value = pageIndex; cmd.Parameters.Add("@PageSize", SqlDbType.Int).Value = pageSize; using var sda = new SqlDataAdapter(cmd); return(Object.GetList <Tables.dbo.Work>(sda)); }