public void CreateIdentifierFromString() { var guidValue = Guid.NewGuid().ToString(); var id = new Identifier(guidValue); Assert.IsNotNull(id); Assert.IsNotNullOrEmpty(id.ToString()); // make sure the string value of the identifier is the same as the guid's string value Assert.AreEqual(id.ToString(), guidValue); Debug.WriteLine("{0} == {1}", id.ToString(), guidValue); }
public IContact Get(Identifier id) { return contacts.SingleOrDefault(g => g.Id == id); }
public bool Delete(Identifier id) { var contact = contacts.SingleOrDefault(g => g.Id == id); contacts.Remove(contact); return true; }
public void CreateNewIdentifier() { var id = new Identifier(); Assert.IsNotNull(id); Assert.IsNotNullOrEmpty(id.ToString()); }
public T GetContact <T>(Contracts.Domain.Identifier contactIdentifier) where T : IIdentifiable { return(Mapper.Map <T>(repositoryContext.Contacts.Get(contactIdentifier))); }
public Contracts.Domain.IContact GetContact(Contracts.Domain.Identifier contactIdentifier) { return(repositoryContext.Contacts.Get(contactIdentifier)); }