Monday 12 September 2022

Aggregate Function Entity Framework C#

 Sum 

Get Sum of amount by a select filter using C# MVC Entity Framework


First Method

 dbConnection db = new dbConnection();
 int InvoiceAmount = db.Bill.Where(x => x.CID == 123).Select(i => i.Amount).Sum();


Second Method


data.Where(x => x.msg == "paid").Sum(y => Convert.ToInt32(y.Amount));


Next Topic

Thursday 28 July 2022

PHP Date Manipulation


Convert Date in dd/mm/yyyy (28-07-2022) format coming from database.

 echo date("d-m-Y", strtotime($item['CreatedDate']));

Next Topic

Monday 11 July 2022

Google Recaptcha Integration | PHP , ASP.NET C# , Codeiginater 4

 




Wednesday 6 July 2022

Google Captcha Integration in Codeiginater 4

 Step 1 : 

    Signup to Google Recaptcha and get the public and private key.

Step 2 :

    Make a Model named CaptchaResponse in Model folder and add the given code below.