public async Task <IHttpActionResult> Put(Guid Useraccountid, [FromBody] IdentityProfile model)
 {
     if (model.Useraccountid != Useraccountid)
     {
         return(BadRequest("Resource Useraccountid's do not match."));
     }
     model.AppendTransactionContext(Request);
     return(await Save(model));
 }
        public async Task <IHttpActionResult> Delete(Guid Useraccountid, [FromBody] IdentityProfile model)
        {
            if (model.Useraccountid != Useraccountid)
            {
                return(BadRequest("Resource Useraccountid's do not match."));
            }
            model.AppendTransactionContext(Request);
            model = await _bl.DeleteAsync(model);

            if (model.Validation.IsValid)
            {
                return(Ok(model));
            }
            CreateModelState(model.Validation);
            return(BadRequest(ModelState));
        }
 public async Task <IHttpActionResult> Post([FromBody] IdentityProfile model)
 {
     model.AppendTransactionContext(Request);
     return(await Save(model));
 }