All blog posts


8/20/2013 First glimpse of DomainController

Categories: Open RIA Services, Project Lead, General

We are still waiting for the code to be released by Microsoft, but in the meantime I thought I would post up an extremly preliminary idea of what the DomainController might look like. In this case, it is the DbDomainController:

public class AddressBookDomainController : DbDomainController<AddressBookContext> 
  protected override void OnDomainCreating(DbDomainBuilder<AddressBookContext> domainBuilder) 
  
    domainBuilder.Repositories.Add<AddressRepository>()
      .RequiresRole(OperationType.All, "AddressEditor")
      .RequiresRole(OperationType.Read, "ContactViewer"); 
    domainBuilder.Repositories.Add<PersonRepository>()
      .RequiresRole(OperationType.All, "PersonEditor")
      .RequiresRole(OperationType.Read, "ContactViewer"); 
    }     
}

The DomainController can look just like the DomainService does with all of the individual CRUD methods in the body, but you will also be able to register repositories with the DomainController and have the CRUD methods picked up from the repository. This is what the repository would look like:

public class PersonRepository 
  AddressBookContext Context {get;set;} 
  public PersonRepository(AddressBookContext context) 
  
    Context = context; 
  
  public IQueryable<Person> GetPeople 
  
    return Context.Persons; 
  
  public void InsertPerson(Person entity) 
  
    DbEntityEntry<LoadRating> entityEntry = this.Context.Entry(entity); 
    if ((entityEntry.State != EntityState.Detached)) 
    
      entityEntry.State = EntityState.Added; 
    
    else
    
      this.Context.People.Add(entity); 
    
  
  public void UpdatePerson(Person currentPerson) 
  
    this.Context.People.AttachAsModified(currentPerson, this.Context); 
  
  public void DeletePerson(Person entity) 
  
    DbEntityEntry<Person> entityEntry = this.Context.Entry(entity); 
    if ((entityEntry.State != EntityState.Detached)) 
    
      entityEntry.State = EntityState.Deleted; 
    
    else
    
      this.Context.People.Attach(entity); 
      this.Context.People.Remove(entity); 
    
  
}


This content has not been rated yet. 

7/12/2013 At the moment, Open RIA Services is 87% cross platform

Categories: Open RIA Services, General

Using Xamarin tools, we know that the RIA Services Native Client is 87% cross platform ready and what parts of it need to be modified. And we don't even have the code yet!

This content has not been rated yet. 

7/3/2013 Thanks

Categories: Open RIA Services

As Jeff said in the announcement, Open RIA Services could not have happened if the community had not asked for it in the first place. My thanks to everyone else who joined me in asking for Open RIA Services to happen.

However, just asking isn't enough to make something happen. There has to be someone willing to listen and do something about the request. Below are some of the people responsible for WCF RIA Services. Make sure you thank the guy at the far right for working so hard over the last several years to make Open RIA Services a reality.

Dinesh Kulkarni, Mathew Charles, Brad Abrams, Nikhil Kothari, Jeff Handley

This content has not been rated yet. 
1 2