Snippets Collections
public static class PHVExtensions
{
    public static IEnumerable<T> SetValue<T>(this IEnumerable<T> items, Action<T>
         updateMethod)
    {
        foreach (T item in items)
        {
            updateMethod(item);
        }
        return items;
    }
}

/*
With that method in place, I can write my statement like this:
customers.Where(c => c.IsValid).SetValue(c => c.CreditLimit = 1000).ToList();

Or like this:
var newCustomers = customers.Where(c => c.IsValid).SetValue(c => c.CreditLimit = 1000);

Or like this for Entity Framework:
db.Customers.Where(c => c.IsValid).ToList().SetValue(c => c.CreditLimit = 1000);
*/
star

Mon Nov 21 2022 14:12:26 GMT+0000 (UTC) https://kuchbhilearning.blogspot.com/2022/11/add-vpc-to-lambda-cdk.html

#aws-cdk #nodejs #typescript #vpc #lambda
star

Tue Oct 04 2022 11:32:44 GMT+0000 (UTC) https://kuchbhilearning.blogspot.com/2022/09/attaching-lambda-secret-manager.html

#aws #aws-cdk #secret-manager #lambda #nodejs
star

Tue Oct 04 2022 11:26:02 GMT+0000 (UTC) https://kuchbhilearning.blogspot.com/2022/09/api-gateway-custom-domain-using-aws-cdk.html

#apigateway #aws-cdk #aws #lambda #route53 #nodejs #restapi
star

Mon Jul 04 2022 19:42:53 GMT+0000 (UTC) https://visualstudiomagazine.com/articles/2019/07/01/updating-linq.aspx

#c# #linq #lambda #extensionmethod

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension