Skip to main content

Posts

Showing posts from May, 2020

Find Value in DataTable all Rows and Columns in C# | Search in DataTable

Find Value in DataTable all Rows and Columns in C# | Search in DataTable  if you write program for find value in DataTable all rows and columns and get this row this program help you         public static DataTable search_in_all_columns(DataTable dtobj, string searchpram)         {             DataTable dt = new DataTable();             dt = dtobj.Copy();             dt.Rows.Clear();             if (!string.IsNullOrEmpty(searchpram) && !string.IsNullOrEmpty(searchpram.Trim()))             {                 searchpram = searchpram.ToUpper().Trim();                 if (dtobj != null && dtobj.Rows.Count > 0)                 {           ...

DataTable to List Model Converter | What is Generic Functions

what is Generic Functions | DataTable to List Model Converter  Generics allow you to define the specification of the data type of programming elements. In other words, generics allow you to write a class or method that can work with any data type. if you work on MVC and use a sql qurey for database intersection you need to fill value in list of model so this program convert DataTable to ListViewModel for you  GenericFunctions.cs using System; using System.Collections.Generic; using System.Data; using System.Dynamic; using System.Reflection; namespace CommonFunctions {     public static class GenericFunctions     {         /// <summary>         ///  pass DataTable in parameter and get data in list type model         /// </summary>         public static List<T> ConvertDataTable<T>(DataTable dt)         {        ...

How to write Data access layer for parameterize query | Dapper vs Qurey | Best way write Data access layer for parameterize query

How to write Data access layer for parameterize query | Best way write  Data access layer for parameterize query Hand    coded SQL Query is fastest way to interact with database is more faster than dapper        We all know about SQL querys is best way and fastest way  to interact with database but if you not use properly than SQL injection is major problem but if you use parametrerize  qurey is best way to protect your data  so I create h data access layer for SQL server parameterize query and very simple to use in your code simply call function ( insert , update , delete , select ) pass qurey and parameter key and value in list form and just call and fastly get you response  See example how to call  SQLServerDBConn.RunSelectQuery("select * from user where userid = {0}", List<string>() { "@usrid" }, List<object>() { 5 } );   DataAccess.cs Start ............ using Microsoft.SqlServer.Management...

Make api in DotNet Core in 10sec | Create universal api for SQL server

Make API in Dot Net Core in 10sec | Create universal API for SQL server Universal API is great concept for app and angular developer need only connect to data base add table name and access table crud operation using API's  If you like this blog so pls share and  Write Comments  about Your experience, Thank You.

Create screen recording software application in C# | Write program for Screen recording in C#

Add caption Create screen recording software application in C# | Write program for Screen recording in C# First you  create console application in and create class file for program   RecorderParams.cs  and write program for take screen shot and make a .avi video stream      For Example:-   start....................... using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using SharpAvi; using SharpAvi.Codecs; using SharpAvi.Output; using System.Windows.Forms; namespace ScreenRecording {     public class RecorderParams     {         public RecorderParams(string filename, int FrameRate, FourCC Encoder, int Quality)         {             FileName = filename;             FramesPerSecond = FrameRate;         ...

How to configure videojs player for HLS stream | VideoJs HLS player | play .m3u8 file using videojs

How to confider videojs player for HLS stream  | VideoJs HLS player | play .m3u8 file using videojs To configure Video.js for HLS (HTTP Live Streaming) streams, you need to include the necessary plugins and set up the player with the appropriate options. Here's a step-by-step guide: 1. Include the Video.js library: Start by including the Video.js library in your HTML file. You can download it from the Video.js website or use a CDN. Add the following code within the `<head>` tag of your HTML file: ```html <link href="https://vjs.zencdn.net/7.14.3/video-js.css" rel="stylesheet" /> <script src="https://vjs.zencdn.net/7.14.3/video.js"></script> ``` 2. Include the HLS plugin: Video.js does not support HLS playback out of the box, so you'll need to include the videojs-contrib-hls plugin. Add the following code after the Video.js library script tag: ```html     <script src="https://unpkg.com/videojs-contrib-hls/dist/vid...