개발 Tip
CKSDEV 사용 방법(SharePoint 개발)
김원배
2013. 8. 21. 10:51
SharePoint를 쉽게 개발하기 위한 방법으로 CKSDev를 이용하면 좋습니다.
이렇게 개발하기 위해서, CKSDev Tool을 설치하면 되는데..
설치파일은 아래 주소로 가서 다운로드 받으면 됩니다.
Visual Studio 2012 버전은 아래 첨부파일을 바로 내려받으세요.
아래에서 보시듯이, Visual Studio 2012도 지원합니다.
설치가 완료되면, Visual Studio - [서버 탐색기]에서 원하는 사이트 모음 우클릭하면 아래처럼 Entity Class를 추가할 수 있는 메뉴가 생성된 것을 보실 수 있습니다.
Entity Class를 추가하고 이용하는 방법은 아래 소스를 참조 바랍니다.
using System.ComponentModel; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; namespace TOZIT.Samples.ExtendingLinq.LinqWebPart { using System.Linq; using System.Web.UI.WebControls; [ToolboxItemAttribute( false )] public class LinqWebPart : WebPart { protected override void CreateChildControls() { using (var ctx = new SocialflowDataContext(SPContext.Current.Web.Url)) { // Fetches the items where the current user is the creator var myItems = from item in ctx.Announcements where item.CreatedByLoginName == SPContext.Current.Web.CurrentUser.LoginName select item; foreach (var item in myItems) { Controls.Add( new Literal { Text = item.Title + " : " + item.CreatedByLoginName + " (you) created this item<br/>" }); } } } } } |