This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sitecore.Context.Item.Paths.IsContentItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sitecore.Data.Items.ItemUtil.AddFromTemplate(string itemName, string templatePath, Item parent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (new EditContext(scItem)) | |
{ | |
redirectItem.Fields["fieldName"].Value = ""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var item = Sitecore.Events.Event.ExtractParameter<Item>(args, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ICustomRepositoryActions<T> : Sitecore.Services.Core.IRepository<T> where T : IEntityIdentity | |
{ | |
string DoSometingCustom(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EntityRespository :ICustomRepositoryActions<Entity> | |
{ | |
public IQueryable<Entity> GetAll() | |
{ | |
throw new NotImplementedException(); | |
} | |
public Entity FindById(string id) | |
{ | |
throw new NotImplementedException(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ServicesController] | |
public class EntityController : EntityService<Entity> | |
{ | |
private ICustomRepositoryActions<Entity> _customRepositoryActions; | |
public EntityController(ICustomRepositoryActions<Entity> repository) | |
: base(repository) | |
{ | |
_customRepositoryActions = repository; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
[ActionName("DoSomethingCustom")] | |
public string Get() | |
{ | |
return "Hello World"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ICustomRepository<T> : Sitecore.Services.Core.IRepository<T> where T : IEntityIdentity | |
{ | |
List<Entity> GetAll(int pageSize, int page); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EntityRespository : ICustomRepository<Entity> | |
{ | |
public IQueryable<Entity> GetAll() | |
{ | |
throw new NotImplementedException(); | |
} | |
public Entity FindById(string id) | |
{ | |
throw new NotImplementedException(); |