Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CRM 2015 Filtering Sample
public class OrganisationController : ApiController
private readonly IOrganisationServiceContext _context;
public OrganisationController(IOrganisationServiceContext context)
this._context = context;
public AccountModelCollection GetAccounts()
var accounts = this._context
.Select(p => new AccountModel()
AccountNumber = p.AccountNumber,
Email = p.EMailAddress1
var collection = new AccountModelCollection(accounts);
return collection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment