Sharepoint Powershell Basis To Enable SharePoint cmdlets in powerShell: Add-PSSnapin "MIcrosoft.SharePoint.PowerShell" 1. Sample SharePoint cmdlets Get-SPWebApplication => to displat all webapplication Get-Command -PSSnapin "Microsoft.SharePoint.PowerShell" | format-table name =>show all commands Get-SPSite "http://senthil-pc:8010/*" Get-SPWeb -site http://senthil-pc:8010/sites/site2 Get-SPSite "http://senthil-pc:8010/*" | Get-SPWeb|Select Title Get-SPUser -Web "http://senthil-pc:8010" Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "http://senthil-pc:8010"} 2. Create a web application $name = "Web Application Created using Powershell" $port = 20000 $url = "http://senthil-pc" $appPoolName = "SP Default App Pool" $appPoolAccount = Get-SPManagedAccount "senthil-pc\Administrator" New-SPWebApplication -Name $name -Port $port -URL $url -Applicati...
Posts
Dependency Injection (DI)
- Get link
- X
- Other Apps
Dependency Injection (DI) Introduction The dependency injection pattern one of the most popular design paradigms today. It is process of removing dependency of object which creates the independent business objects. It is very useful for Test Driven Development. Background This tip presents an overview of the dependency injection pattern, the different types of dependency injection, and the advantages and drawback of DI with c# source code examples. Scenario of Object Dependency Object dependency means one object needs another object to execute properly, in multitier application (Presentation Tier, Business Logic Tier and Service Tier), the very common scenario is; Presentation Tier dependent on Business Logic and Business Logic requires different services on the basis of end user selection. For instance for Insurance domain, different services could be like ClaimService , AdjudicationService , and PaymentService . If we need some property of Payment service th...
C# Basic
- Get link
- X
- Other Apps
Extension Method in C# Introduction Extension methods are a new feature in C# 3.0. An extension method enables us to add methods to existing types without creating a new derived type, recompiling, or modify the original types. We can say that it extends the functionality of an existing type in .NET. An extension method is a static method to the existing static class. We call an extension method in the same general way; there is no difference in calling. Feature and Property of Extension Methods The following list contains basic features and properties of extension methods: It is a static method. It must be located in a static class. It uses the " this " keyword as the first parameter with a type in .NET and this method will be called by a given type instance on the client side. It also shown by VS intellisense. When we press the dot (.) after a type instance, then it comes in VS intellisense. An extension method should be ...
- Get link
- X
- Other Apps
Static Class * Only 1 instance of the object is created for static classes * Static class Should be declare static keyword for declare constructor or method or variable * Can't specify access specifier for static Constructor * Static constructor should run only once. Example public static class MyClass { static MyClass() { Console .WriteLine( "Static Constructor" ); } public static void SomeMethod() { ...
SQL Cursor
- Get link
- X
- Other Apps
SQL Cursor Let me say one thing: DON'T use cursors. They should be your preferred way of killing the performance of an entire system. Most beginners use cursors and don't realize the performance hit they have. They use memory; they lock tables in weird ways, and they are slow. Worst of all, they defeat most of the performance optimization your DBA can do. Did you know that every FETCH being executed has about the same performance of executing a SELECT? This means that if your cursor has 10,000 records, it will execute about 10,000 SELECTs! If you can do this in a couple of SELECT, UPDATE or DELETE, it will be much faster. Beginner SQL programmers find in cursors a comfortable and familiar way of coding. Well, unfortunately this lead to bad performance. The whole purpose of SQL is specifying what you want, not how it should be done. I've once rewritten a cursor-based stored procedure and substituted some code for a pair of traditional SQL queries. The table had only...
Indexing and Pagenation in SQL
- Get link
- X
- Other Apps
Indexing An index can be created in a table to increase the performance of application and we can get the data more quickly and efficiently Let’s see an example to illustrate this point suppose now we are reading book in that I need to check the information for dbmanagement to get this information I need to search each page of the book because I don’t know in which page that word information exists it’s time taken process. Instead of reading the each page of book to get that particular word information if I check the index of book (Glossary) it is much quicker for us to get the pages which contains the information with dbmanagement word. By using second method we can save lot of time and we can get information in efficient way. Example of creating SQL Index on multiple columns CREATE INDEX SampleIndex ON UserInformation ( ...