public void AddPost(Post post) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (exists) { AddPostCommand.Execute(new { post.Author, post.Content, post.Timestamp }); } }
public void EditProfile(Profile profile) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (exists) { UpdateProfileCommand.Execute(new { profile.Username, profile.FirstName, profile.LastName, profile.Email, profile.Mobile, profile.Description }); } }
public void Register(Profile profile) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (!exists) { _paymentPortal.ProcessPayment(profile.Username); InsertProfileCommand.Execute(new { profile.Username, profile.FirstName, profile.LastName, profile.Email, profile.Mobile, profile.Description }); } }
public void AddPost(Post post) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (exists) { var id = AddPostCommand.Execute(new { post.Author, post.Content, post.Timestamp }); var hash = HashObject(post).ToHexString(); Connector connector = new Connector(credentialManager.PublicKey, credentialManager.PrivateKey); connector.Call("addPostHash", id, hash); } }
public void Register(Profile profile) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (!exists) { _paymentPortal.ProcessPayment(profile.Username); var id = InsertProfileCommand.Execute(new { profile.Username, profile.FirstName, profile.LastName, profile.Email, profile.Mobile, profile.Description }); var hash = HashObject(profile).ToHexString(); Connector connector = new Connector(credentialManager.PublicKey, credentialManager.PrivateKey); connector.Call("addProfileHash", id, hash); } }
public void EditProfile(Profile profile) { bool exists = IsUsernamePresentQuery <bool> .Execute(new { profile.Username }); if (exists) { UpdateProfileCommand.Execute(new { profile.Id, profile.Username, profile.FirstName, profile.LastName, profile.Email, profile.Mobile, profile.Description }); var hash = HashObject(profile).ToHexString(); Connector connector = new Connector(credentialManager.PublicKey, credentialManager.PrivateKey); connector.Call("editProfileHash", profile.Id, hash); } }