public long Create(ClientRecordModel tentity) { using (var scope = new TransactionScope()) { var NewRecord = new ta_ussbk_clientrecord { businessname = tentity.businessname, clientaddress = tentity.clientaddress, clientemail = tentity.clientemail, clientname = tentity.clientname, contactmobile = tentity.contactmobile, formodule = tentity.formodule, productid = tentity.productid, productname = tentity.productname, userrole = tentity.userrole, userblocked = tentity.userblocked, expirydate = tentity.expirydate, remarks = tentity.remarks, }; _unitOfWork.ClientRecordRepository.Insert(NewRecord); _unitOfWork.Save(); scope.Complete(); return(NewRecord.recordid); } }
public static ClientRecordModel ClientRecordMapper(ta_ussbk_clientrecord tentity) { var resultl = new ClientRecordModel { businessname = tentity.businessname, clientaddress = tentity.clientaddress, clientemail = tentity.clientemail, clientname = tentity.clientname, contactmobile = tentity.contactmobile, formodule = tentity.formodule, productid = tentity.productid, productname = tentity.productname, recordid = tentity.recordid, userrole = tentity.userrole, userblocked = tentity.userblocked.Value, expirydate = tentity.expirydate, upassword = tentity.upassword, remarks = tentity.remarks, }; return(resultl); }