public IHttpActionResult AddInvoData(invoice invoiceobj) { AuthDetails authdet = LoginUserDetails(); invoiceobj.UpdatedBy = authdet.UserId; invoiceobj.CreatedBy = authdet.UserId; var result = service1.Add(invoiceobj); return(Ok(result)); }