示例#1
0
 public async Task <IHttpActionResult> Put(Guid Loginid, [FromBody] IdentityLogin model)
 {
     if (model.Loginid != Loginid)
     {
         return(BadRequest("Resource Loginid's do not match."));
     }
     model.AppendTransactionContext(Request);
     return(await Save(model));
 }
示例#2
0
        public async Task <IHttpActionResult> Delete(Guid Loginid, [FromBody] IdentityLogin model)
        {
            if (model.Loginid != Loginid)
            {
                return(BadRequest("Resource Loginid'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));
        }
示例#3
0
 public async Task <IHttpActionResult> Post([FromBody] IdentityLogin model)
 {
     model.AppendTransactionContext(Request);
     return(await Save(model));
 }